💡 If you have problems with CF, use
/cf-helpto get help or ask in the GitHub Discussions.
✨ Latest changes
plugin v0.46.02026-10-05
- Add Devin CLI (beta) as a new host: generated
plugin-devin/artifact (Claude layout with a Devin-shapedhooks/hooks.json, a root.mcp.jsonfor the memory MCP, skills and agents adapted to Devin), installable withdevin plugins install dinhanhthi/coding-friend#plugin-devin#13b0bb1a #d5c8ac52 - Add
*.devin.*hook adapters:auto-approve.devin.cjs(PermissionRequest, deterministic rules only; unknown calls defer to Devin's native prompt),block-adapter.devin.sh(turnsprivacy-block/scout-blockdenials into Devin's exit-2 block contract),rules-reminder.devin.shandmemory-capture.devin.sh(JSONadditionalContext; memory capture runs on the first prompt after compaction because Devin does not deliverPostCompactioncontext) #d5c8ac52
cli v1.42.02026-10-05
- Add
--agent devin/--devin(Devin CLI, beta) to install/uninstall/enable/disable/init/update/permission/status;cfdrives thedevin pluginscommands: GitHub#plugin-devinsubdir in production, a live--locallink ofplugin-devin/in dev mode (cf dev on) #76e4d5fd cf update --agent devinswitches between the dev link and the GitHub install, and replaces only installs from our own sources; a foreign install (e.g.#plugin) still needscf install --devin, which replaces it and prints a cloud-sync notice #76e4d5fd #f89e3c6a
+2 more
cf init --agent devinruns a Devin wizard and registers the learn MCP in~/.config/devin/mcp_config.json(memory MCP ships inside the plugin); the file is written atomically with mode 0600 and an invalid-JSON config is never overwritten #6dd82f16 #f89e3c6acf enable/cf disable --agent devinprint guidance (Devin has no per-plugin toggle),cf statusshows a Devin row,cf mcpreports the plugin MCP,cf permission --agent devinis supported #3ffd4ea5
Coding Friend adds skills, agents, and hooks to the tools you already use. You get plan → implement → review → commit, with project knowledge in docs/ and learning notes in ~/.coding-friend/learn/. A memory system runs underneath, along with useful hooks and mechanisms to protect your privacy and security.
Harness only
Without CF
You can only rely on the harness and default settings of the tool you’re using, or sometimes no harness at all. Even small tool changes can affect your usual workflow without you noticing.
Standards · memory
With CF
Besides the harness for the tool you’re using, CF suggests best-practice standards for daily workflows—from planning and code reviews to bug fixes, research, and optimization. CF also includes a memory system that helps agents avoid spending too many tokens on topics they’ve worked on before. You can also build a learning hub for readers as you work with CF; the system will help summarize everything and turn it into a polished website.
🤝 Supported Tools
Coding Friend installs on the host you already use.
| Host | Support | Command | Notes |
|---|---|---|---|
| Claude Code | 100% | cf install | Default. |
| oh-my-pi | 95% | cf install --agent omp | Beta. Skills come from the Claude plugin cache. |
| Devin CLI | 86% | cf install --agent devin | Beta. Requires devin >= 3000.11.3. Deferred memory auto-capture. |
| Codex | 77% | cf install --agent codex | Beta. Invoke as $cf-*. Partial hooks and auto-approve. |
| Antigravity | 73% | cf install --agent agy | Beta. Requires agy >= 1.1.0. No memory auto-capture. |
| Cursor | 100% | comes with Claude | Runs Claude Code / Codex underneath. |
| Grok Build | 100% | comes with Claude | Same as Cursor. |
| ZCode | 100% | via github marketplace | not tested 100% |
% = Claude is a baseline with all skills, agents, hooks. Some are Claude only: statusline, session save/restore (/cf-session), and task tracking. Other hosts ship their own equivalents, so they are not counted.
📦 Install
🤖 Automatic Installation (Recommended)
Copy and paste this prompt into your AI agent — it will read the documentation and set up everything automatically:
Install Coding Friend from https://cf.dinh.work on my system. First read the installation documentation to understand what Coding Friend is and how to install it properly. Check if I have Node.js 20+, install coding-friend-cli globally, then install the plugin for my current AI agent (auto-detect: Claude Code, Codex, oh-my-pi, Antigravity, Devin CLI, etc.). After installation, initialize the project with
cf init. Guide me through the entire process and verify everything works correctly.
📋 Manual Installation
You need Node 20+ and a supported host.
Via CLI (Recommended)
npm i -g coding-friend-cli
# If `cf` is taken, use `cdf`
cf install # Claude Code (default)
cf install --agent codex # or 'omp', 'agy', 'devin'
cf init # per project: docs/, .coding-friend/config.json
cf update # later: pull the newest plugin
# Need help?
cf help
# Get Started in any project
cf init
Scope with --user | --project | --local. Host aliases: --codex / --omp / --agy / --devin. Then use /cf-help inside your agent to ask anything about CF.
Via Plugin Manager
plugin marketplace add dinhanhthi/coding-friend
plugin install coding-friend@coding-friend-marketplace
Devin CLI (beta): devin plugins install dinhanhthi/coding-friend#plugin-devin installs the generated plugin-devin/ directly. Inside Devin, invoke skills bare or namespaced — /cf-plan or /coding-friend:cf-plan.
After cf init or working with CF, a folder docs/ is created inside your project with nested folders for plans, memory, research, reviews,... and more.
✨ Features
Skills are slash commands (/cf-*) or auto-invoked when a matching situation appears. Settings that live in config.json — run cf config and follow the instructions there. To extend a built-in skill, see Custom Guides.
🔁 Workflow
You plan, implement, review, commit, then ship. Bugs loop through /cf-fix and cf-sys-debug.
🗺️ Plan & build
-
/cf-plan(source) — Brainstorms with you, then writes a phased plan underdocs/plans/<plan-name>/(plusbrief.mdwith the original request and Q&A in normal/hard mode). Under the hood:cf-explorermaps the repo,cf-plannercompares approaches, thencf-implementerruns each task. Each phase stays reviewable (at most 15 files) without over-splitting (fewest phases that fit, normally 3+ tasks each), so reviews stay fast and cheap. Available modes:- (none) — normal: full workflow, writes the plan file
--fast/--quick— skip discovery and the planner; plan stays in chat, no file. If the plan turns multi-phase it switches to normal and writes the file. Combined with autopilot (--autoorplanAuto), the file is always written--hard— extra discovery plus rollback planning--auto— after approval, run every phase (review, fix Critical/Important, commit) with no prompts; combines with any mode. Also on when configplanAuto: trueunless--no-auto--no-auto— force autopilot off for this run, even ifplanAuto: true--commit-per-task— with autopilot, commit each task asphase N/M task i/K <title>and review once per phase over those commits;[parallel]phases run sequentially. Also on when configplanCommitPerTask: true--no-commit-per-task— force commit-per-task off for this run, even ifplanCommitPerTask: true--inline/--no-file— plan in chat only, no file; cannot combine with autopilot (--autoorplanAuto)--model <alias>— pincf-planner(opus/sonnet/haiku/fable); ignored in fast--gui/--human— also write a human overview doc (off by default). To turn that doc on for every run, usecf config--add-tests/--tdd— not a plan mode; forwarded to everycf-implementerso each task uses TDD. Without it, implementers write code with no new tests
Example output:
Progress | Status | Phase | Tasks | | -------------- | ----------------- | ------- | | ✅ DONE | Phase 1: Teardown | 3 tasks | | 🔄 IN PROGRESS | Phase 4: Content | 6 tasks | | ⬜ TODO | Phase 5: Merge | 1 task | #### Phase 1 [sequential] -
/cf-plan-resume(source) — Reloads a saved plan and its context file, skips DONE tasks, re-runs the rest via the same execute protocol. If the plan hasauto: trueand anAUTOPILOTsection, it continues in autopilot, honoring frontmattercommitPerTask: true;--commit-per-task/--no-commit-per-taskoverride it. -
/cf-plan-review(source) — Reviews a saved plan folder with a fresh in-session reviewer before you implement it;--codex/--gemini/--claude/--cursor/--grokadd external reviewers in parallel and merge.--fix(--inline) applies Critical/Important findings immediately. Writesreview.mdnext to the plan and, without--fix, offers to apply Critical/Important findings. -
/cf-advise(source) — Interviews one question at a time, then a verdict-first recommendation with pitfalls and ranked alternatives. Never writes code or a plan. Flags:--quick/--fast(2–3 questions),--save(write todocs/memory/decisions/). -
/cf-design(beta) (source) — Makes new or changed UI match the project's existing look. The first word of the argument picks the mode (empty → it asks which one):scan [path]— read existing UI files, extract colors / type / spacing / components, writedocs/DESIGN.md[description]— implement new UI from that description, usingdocs/DESIGN.md(or a fresh scan) as the basemodify [what] -- [how]— change one element and keep it consistent with the rest of the project
-
/cf-showcase(source) — Builds an intro video (mp4) or poster (png / pdf / html) from the project's real content intodocs/showcase/. The agent invents the concept itself (no fixed scene order, scene types or style) and only asks practical questions: length, language, aspect or size, output format, what to emphasize, audio.--video/--posterskip the format question. Video is 30s by default; above 90s it warns about file size and render time, then lets you decide. -
/cf-optimize(source) — Detects available profilers, measures a baseline, changes one thing, re-measures, compares.
🐛 Fix & debug
-
/cf-fix(source) — Reproduces the bug, searches past bug docs, explores, fixes, verifies, then reviews. Escalates hard bugs tocf-sys-debug.--add-tests(or--tdd) writes a failing test first when none exists.Example output:
> ✨ **CODING FRIEND** → /cf-fix activated Root cause: [what was wrong, file:line] Fix: [what changed, file:line] Confirmed: [evidence or test that proves the fix] Tests: [pass/fail count, regression test location] Status: DONE -
cf-sys-debug(source) — Four phases: state a file:line hypothesis before touching code, test it, apply a regression-guarded fix, write a bug doc. Auto-invoked for recurring or unclear bugs. -
cf-tdd(source) — Auto-loaded before production code. Direct mode (default) writes no new tests. TDD mode is--add-testsor--tdd, ortdd: trueviacf config.--autothen reviews, fixes Critical/Important, and commits. -
cf-verification(source) — Auto-invoked after code changes. Runs tests / build / lint, shows the output, and blocks a "done" claim without evidence.
🚀 Review & ship
-
/cf-review(source) — Snapshots the diff and hands it tocf-reviewer, which checks all five layers: project rules, plan alignment, correctness, security, tests.- Depth — auto from change size, or force with
--quick/--deep:- TRIVIAL — no reviewer: ≤2 files and ≤20 lines, no sensitive paths, only a secrets check (skipped when you pass
--quick/--deep) - QUICK / STANDARD — 1 reviewer
- DEEP — 2 reviewers (
cf-reviewer-securityjoins in parallel)
- TRIVIAL — no reviewer: ≤2 files and ≤20 lines, no sensitive paths, only a secrets check (skipped when you pass
- External reviewers (opt-in, run in parallel, merged into the same report):
--with-codex/--codex,--claude,--gemini,--cursor,--grok--out— write a/cf-review-outprompt instead (not with the flags above)- Codex on by default:
cf config
- Fix & commit:
--fix— apply Critical/Important findings, then re-review (up toreview.maxRounds, default 5)--commit— implies--fix; commits only the reviewed paths once clean, after a secret scan; stops on a pre-commit hook failure- Neither works with a commit-range target or
--out
- Report — always ends with
Review status: COMPLETE | PARTIAL | FAILED- COMPLETE = full coverage, not "no findings"
- PARTIAL / FAILED stops an autopilot commit
- Timeouts:
review.nativeTimeout(600s) — soft budget for in-session reviewersreview.agentTimeout(300s) — hard limit on each external reviewer
- Specialists — one generalist is a trade-off, not a free win.
cf-reviewer-plan,-quality,-tests,-rules, and-reducerstay directly callable when a layer deserves its own pass.
Example output:
🚨 Critical - None. ⚠️ Important - None. 💡 Suggestions - None. 📋 Summary No blocking issues found. You're clear to commit. Review status: COMPLETE - Depth — auto from change size, or force with
-
/cf-review-out(source) — Writes a self-contained prompt + diff todocs/reviews/for any external AI or a human. -
/cf-review-in(source) — Reads that result file, presents findings, offers to fix. -
/cf-commit(source) — Analyzes the diff, soft-review check, conventional commit focused on why. -
/cf-ship(source) — Verify → commit → push → PR.--dry-runsimulates and does not commit, push, or open a PR. Custom Before guides run first (for example a version bump).
💡 Knowledge
/cf-ask(source) — Explores the codebase (cf-explorer), answers a focused question, saves the Q&A todocs/memory/./cf-scan(source) — Token-heavy project scan; writes architecture, conventions, and stack into memory (updates, does not duplicate)./cf-remember(source) — Extracts conversation knowledge intodocs/memory/(bugs, decisions, conventions, features) for later AI recall. Also auto-invoked./cf-learn(source) — Writes educational notes for you (default~/.coding-friend/learn/). Host withcf learn hostor share withcf mcp. Output, language, and related settings:cf config. Runcf learn hostand you get a site like this:
/cf-teach(source) — Conversational story of what happened and why. Writes underdocs/learnby default (not the same folder as/cf-learn). Language and output:cf config./cf-research(source) — Parallel web / subagent research →docs/research/. Does not plan or build.
📌 Context & session
/cf-session(beta) (source) — Claude only. Saves the session todocs/sessions/so you can restore it on another machine./cf-checkpoint(source) — Writes a resume snapshot (goal, decisions, next steps) todocs/context/checkpoints/./cf-checkpoint-from(source) — Loads that snapshot into a fresh chat, then does the rest of the message.--recapalso prints a short summary of the restored context./cf-warm(source) — Reads git history since you were away, groups it by topic, writesdocs/warm/.--user <name>(elsegit config user.name),--n-commits <N>(default 10)./cf-later-do(source) — Listsdocs/later/items, you pick one, routes to/cf-fixor/cf-plan, deletes the file only after the fix is verified.
❓ Help
/cf-help(source) — Ask anything about Coding Friend: skills, flags, agents, hooks, CLI, config, memory, hosts. Also auto-invoked when you ask about the toolkit itself.
🧠 Memory
Every session starts from scratch. CF Memory is persistent, searchable project knowledge. Markdown in docs/memory/ is the source of truth. Three search tiers degrade gracefully (SQLite → MiniSearch → grep). Use it from other LLM tools via the MCP server (cf mcp). Run cf config for tier, embeddings, and capture.
✅ Auto-approve
Permission gate that auto-approves safe tool calls and working-dir edits. Unknown tools defer to Claude's native permission flow / auto mode unless you opt in to the LLM classifier via autoApproveLLM. Run cf config.
- Rule-Based Gate: Instant pattern matching — read-only tools auto-approved, destructive commands blocked.
- Working-Dir Edits: File edits (Write/Edit) inside your project directory are auto-approved.
- Test Runners:
npm test,pnpm exec playwright test,pytest,go test,cargo test,mvn test,rspecand friends are always auto-approved, in every language — including piped and chained forms likenpm test 2>&1 | tail -50, as long as every other segment is safe too. Re-gate them withautoApproveIgnore. - LLM Classifier: Opt-in via
autoApproveLLM(defaultfalse). When off, unknown tools emit no hook decision and defer to Claude's native permission flow / auto mode. When on, CF shells out toclaude --print --model sonnet. Claude only — Codex already has Smart Approvals /--approve-for-me, AGY remembers approvals per chat; spawning those models from a hook would deadlock or race native. Grok / Cursor have no CF hook adapter.
You can extend the Bash allow/deny lists in config:
{
"autoApprove": true,
// extra command prefixes to auto-approve. Merged across global + local
"autoApproveAllowExtra": ["cargo check", "terraform plan"],
// use below setting to bypass CF auto-approve and let Claude Code handle them.
// this is also how you re-gate test runners
"autoApproveIgnore": ["cargo test", "cargo build"],
// opt-in Sonnet classifier for unknown tools (default: defer to Claude native)
"autoApproveLLM": false
}
⚠️ Not 100% safe: CF auto-approve is an additional layer that helps reduce prompts, but it doesn't guarantee 100% safety. You can still trigger unsafe actions if you use the wrong command or if the LLM classifier (when enabled) makes a mistake.
🛡️ Security
Layered prompt-injection defense. Three layers: isolation, extraction, then alert. Fetched content is data, never instructions.
- Isolation: External content flagged as untrusted data — never treated as instructions.
- Extraction: Only facts and information extracted — embedded commands discarded.
- Alert: Suspicious content flagged to user — prompt injection attempts exposed.
📟 Statusline
Claude only. Run cf statusline to install the renderer.

🧭 Agents
Skills dispatch agents as subagents that run in their own context.
| Agent | Model | Does | Dispatched by |
|---|---|---|---|
cf-explorer (source) | haiku | Maps the repo and writes context files | /cf-plan, /cf-fix, /cf-ask, /cf-advise, /cf-optimize, /cf-research, /cf-scan, /cf-showcase |
cf-planner (source) | inherit | Compares approaches and breaks work into tasks | /cf-plan |
cf-implementer (source) | inherit | Writes the code (TDD with --add-tests) | /cf-plan, /cf-plan-resume, /cf-fix, /cf-optimize, /cf-review --fix, cf-tdd |
cf-reviewer (source) | inherit | Reviews the diff across all five layers | /cf-review (1 QUICK, 1 STANDARD, 2 DEEP) |
cf-reviewer-plan (source) | sonnet | Checks the diff against the plan | direct call only |
cf-reviewer-security (source) | sonnet | Finds security issues in the diff | /cf-review in DEEP (2nd reviewer) |
cf-reviewer-quality (source) | haiku | Names, complexity, duplication, slop | direct call only |
cf-reviewer-tests (source) | haiku | Coverage and missing tests | direct call only |
cf-reviewer-rules (source) | haiku | CLAUDE.md MUST/SHOULD/ALWAYS/NEVER | direct call only |
cf-reviewer-reducer (source) | haiku | Deduplicates and ranks findings | /cf-plan-review (merges external reviews) — /cf-review merges inline |
cf-writer (source) | haiku | Writes straightforward markdown | /cf-learn, /cf-remember, /cf-scan, /cf-fix, /cf-ask, /cf-advise, /cf-sys-debug, /cf-warm |
cf-writer-deep (source) | sonnet | Writes deep technical docs | /cf-learn, /cf-teach, /cf-plan (overview), /cf-remember, /cf-scan |
📘 Custom Guides
Extend a built-in skill without editing the plugin. When that skill runs, CF loads your guide (if one exists) and applies its sections: ## Before before the first step, ## Rules throughout, ## After after the last step. Sections are optional — include only what you need.
cf guide create cf-commit # scaffolds the local file
cf guide list # local guides in this project
cf guide create writes a project file. The skill name must match a built-in skill (cf-commit, cf-plan, …). It will not overwrite an existing guide.
| Scope | Path | Who it applies to |
|---|---|---|
| Local | .coding-friend/skills/<skill-name>-custom/SKILL.md | This project. Wins if both exist. |
| Global | ~/.coding-friend/skills/<skill-name>-custom/SKILL.md | All projects. Create this file yourself. |
Local and global are not merged — if the local file exists, the global one is ignored. The loader resolves the path from the git project root, so it still works if your shell is in a subdirectory.
Example — .coding-friend/skills/cf-commit-custom/SKILL.md:
## Before
- Check branch naming convention (must match `feat/XX-*` or `fix/XX-*`)
## Rules
- Always include the JIRA ticket from the branch name in the commit subject
## After
- Run tests if the commit type is `feat:` or `fix:`
The next time you run /cf-commit, that guide is loaded. No /clear needed.
⚙️ Config
You have two config files. Global is ~/.coding-friend/config.json. Project is .coding-friend/config.json — local overrides global at the same top-level keys.
// Some examples
{
"language": "en",
"docsDir": "docs",
"tdd": false,
"planAuto": false,
"planCommitPerTask": false,
"autoApprove": false,
"autoApproveLLM": false,
"review": {
"withCodex": false,
"maxRounds": 5
},
"memory": {
"autoCapture": false
},
"learn": {
"outputDir": "~/.coding-friend/learn"
}
}
Learn notes default to ~/.coding-friend/learn/ (learn.outputDir is configurable). docsDir is for plans, memory, and research — not the default learn output.
| Key | Description |
|---|---|
language | Language for docs (plans, memory, research, ask). Default: en. |
docsDir | Base docs directory relative to project root (plans, memory, research). Default: docs. Not the default learn output. |
autoApprove | Enable the auto-approve hook. Default: false. |
autoApproveLLM | Opt-in Sonnet classifier for unknown tools (Claude only). Default: false — unknowns defer to Claude native / auto. |
privacyBlock | Privacy-block hook (deny .env, keys, credentials). Default: true. |
scoutBlock | Scout-block hook (deny ignored dirs). Default: true. |
autoApproveAllowExtra | Bash command prefixes to auto-approve (merged across global + local). |
autoApproveIgnore | Bash command prefixes to always require user review. |
disableGUIPlan | Disable the human overview doc /cf-plan generates. Default: true. |
guiPlanFormat | Format for the GUI plan: html or md. Default: html. |
learn | Learn settings: language, outputDir, categories. Default outputDir: ~/.coding-friend/learn. |
review | Review settings. Nested object; withCodex runs a Codex second opinion; withClaude / withGrok / withCursor / withGemini add that headless external reviewer (all default false); agentTimeout (default 300) is enforced on each external reviewer subprocess; nativeTimeout (default 600) is a cooperative budget for each in-session reviewer job; maxRounds (default 5) caps the autopilot review-fix loop and the /cf-review --fix loop. |
tdd | Boolean. Enable TDD (RED→GREEN→REFACTOR) by default. |
planAuto | Boolean. Default /cf-plan into autopilot without --auto. --no-auto forces off. /cf-plan-resume ignores this key. Default: false. |
planCommitPerTask | Boolean. Under /cf-plan autopilot, commit each task separately and review once per phase (range review, so review.with* external reviewers do not run). Ignored without autopilot. --no-commit-per-task forces off. /cf-plan-resume ignores this key but honors frontmatter commitPerTask: true and accepts --commit-per-task / --no-commit-per-task. Default: false. |
memory | Object. MemoryConfig for search tier, embeddings, and capture. |
memory (MemoryConfig) keys:
tier—"auto","full","lite", or"markdown".embedding— object withprovider("transformers"or"ollama"),model, andollamaUrl.autoCapture— boolean. Save session context on PreCompact.autoStart— boolean. Start the memory daemon when the MCP server connects.
List gitignore-style paths in .coding-friend/ignore so scout-block skips them.