adapt-to-project
Skill2 starsChanged 30 days agoMITView on GitHub
Fit this Claude Code template to the repository it was copied into by filling .claude/project.env, AGENTS.md, the conventions docs and their rule loaders, and the architecture, security and glossary docs, then pruning skills and agents the project cannot use.
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- eugenelim/agent-ready-repotheir own version, first seen Nov 14, 2026
- AlexisBalayre/claude-code-configword for word, first seen Oct 17, 2026
- phanijapps/memextheir own version, first seen Oct 17, 2026
Other versions3 projects use a version of this.
Word for word · 1
- AlexisBalayre/claude-code-config★ 2100% same
Edited · 0
None found.
Wrote their own version · 2
- eugenelim/agent-ready-repo★ 31same name
- phanijapps/memex★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- address-review-commentsSkill
- backfill-issuesSkill
- cavemanSkill
- codebase-designSkill
- daily-noteSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- find-dead-codeSkill
- fix-sonarSkill
- fix-wizSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- obsidian-vaultSkill
- pr-ci-reviewSkill
- pr-descriptionSkill
- prototypeSkill
- researchSkill
- retroSkill
- review-retroSkill
- tddSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- wizSkill
- writing-for-agentsSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Facts come from the code; decisions come from the user: Never invent a convention, a rationale, or a security property.
- Very specific: line 18
If the repo already had its own CLAUDE.md, AGENTS.md, .cursor/rules, CONTRIBUTING.md or style guide, those are primary sources: merge their …
- Distinctive: line 28
Patterns: read 5-10 representative source files per area and 3-5 tests.
- Very specific: line 40
Add the project's safe commands to permissions.allow in .claude/settings.json (e.g.
- Distinctive: line 80
No dangling references: grep the repo for each deleted skill, agent and doc name.
- Very specific: line 81
Every .claude/rules/*.md import target exists, and every docs/conventions/*.md has a loader.
- Very specific: line 83
Run the quality gate for real: add a trivial edit to one source file, run CLAUDE_PROJECT_DIR="$PWD" .claude/hooks/quality-checks.sh, …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adapt to project
The template ships stack-agnostic: every project-specific slot carries a TODO(adapt) marker, and every hook no-ops until .claude/project.env names a command. This skill turns the skeleton into this project's config. It is re-runnable: fill only what is still TODO(adapt) or what the focus argument names, and never overwrite filled content without asking.
Facts come from the code; decisions come from the user. Never invent a convention, a rationale, or a security property. What the code cannot tell you becomes a question, or stays a TODO(adapt) the report lists as deferred.
1. Inventory
- Confirm you are in a worktree on a feature branch (see
AGENTS.md§Git workflow). - List the open slots:
grep -rn "TODO(adapt):" --exclude-dir=node_modules --exclude-dir=.worktrees --exclude-dir=adapt-to-project .(the colon form marks a slot; the bare form is a mention). - If the repo already had its own
CLAUDE.md,AGENTS.md,.cursor/rules,CONTRIBUTING.mdor style guide, those are primary sources: merge their content into the template files, never discard it.
2. Survey
Delegate to an Explore subagent on a large repo so file dumps stay out of context. Establish:
- Stack and package manager: manifests and lockfiles (
package.json,pyproject.toml,go.mod,Cargo.toml,pom.xml,build.gradle,Gemfile, ...). - Real commands: lint, format, typecheck, test, install, dev, codegen, migrations. CI workflows and task runners (
Makefile,justfile,package.jsonscripts) show what the team actually runs. - Areas: top-level layout, workspace members, and the boundaries where rules change (API, database, frontend, workers, infra).
- Generated code: codegen configs,
generated/directories, protobuf/OpenAPI outputs. - Patterns: read 5-10 representative source files per area and 3-5 tests. Note naming, layering, error handling, logging and test layout that recur. A pattern the code breaks more often than it follows is not a convention; ask instead.
3. Confirm the profile
Present in one message: the detected stack, the proposed .claude/project.env values, the list of areas with their path globs, and the questions the code could not answer (code owners, whether the automated PR review is wanted, which personal-integration tools are in use). Wait for answers before writing.
4. Project profile
- Fill
.claude/project.envand delete itsTODO(adapt)line. Run every command once before writing it:LINT_CMDandFORMAT_FIX_CMDagainst one real source file (they receive file paths as arguments; wrap a tool that doesn't accept paths),TYPECHECK_CMDandTEST_CMDas-is. A command that fails on a clean trunk is not ready; report it rather than writing it. - Set
SOURCE_EXTENSIONSto the project's languages and narrow the extension glob in.claude/rules/core-conventions.mdto match. GENERATED_PATHS_REGEXfrom the generated code found.FILE_NAMING_*only when the codebase already follows one naming rule consistently (count violations withgit ls-files); otherwise leave empty.GIT_TRUNKfromgit symbolic-ref --short refs/remotes/origin/HEAD(striporigin/).- Add the project's safe commands to
permissions.allowin.claude/settings.json(e.g.Bash(<test command>*)). .github/CODEOWNERS: the owners the user named.
5. Conventions
docs/conventions/ holds obligations only; system description belongs in docs/reference/. Don't restate what the linter or formatter already enforces. Each doc is paid in tokens once per session per area, so keep each lean.
core.mdandtesting.md: replace eachTODO(adapt)section with observed rules, or delete the section when the project has nothing to say.- For each area whose rules differ from core, create:
docs/conventions/<area>.mdwith the same title and genre-contract line ascore.md;.claude/rules/<area>-conventions.md:paths:frontmatter plus a single@docs/conventions/<area>.mdimport, nothing else;- a row in the
AGENTS.mdConventions table and in.claude/rules/README.md.
.claude/spot-checks.tsv: add only cheap, near-zero-false-positive structural checks for rules the linter cannot express (a forbidden import in a layer, a banned API in a directory). Each message cites its conventions section.
6. Knowledge docs
AGENTS.md: heading, one-paragraph description, role, extra key commands and their gotchas.docs/reference/architecture.md: components, layout, request and data flow, external dependencies.docs/explanation/security-model.md: from the auth middleware, secret loading and input validation code. Mark unverified properties as open questions, never as guarantees.docs/glossary.md: the 5-15 domain nouns that recur across modules, defined as the code uses them.docs/README.md: list the area docs you created.
7. Prune
Present a keep-or-delete table for every skill and agent, with a one-line reason each, and delete only after the user confirms. Coupled sets go together:
| Set | Delete when |
migration-reviewer agent | the project has no database schema or migrations |
CI review pipeline: .github/workflows/claude-code-review.yml, tools/review/, pr-ci-review, review-retro, the review-* agents | the repo is not on GitHub, or the user doesn't want automated PR review |
obsidian-vault + daily-note | the user doesn't use Obsidian |
backfill-issues | no issue-tracker MCP (to-spec / to-tickets fall back to local files, keep them) |
fix-sonar / wiz + fix-wiz | no SonarQube / no Wiz |
prototype/UI.md | the project has no UI (keep LOGIC.md) |
Then drop the matching keys from .env.example and update every catalog: .claude/skills/README.md, .claude/agents/README.md, the counts and trees in .claude/README.md and README.md.
8. Verify
- The step 1 grep returns only slots the user chose to defer.
- No dangling references: grep the repo for each deleted skill, agent and doc name.
- Every
.claude/rules/*.mdimport target exists, and everydocs/conventions/*.mdhas a loader. bash -n .claude/hooks/*.sh scripts/*.sh, and hooks and scripts are executable.- Run the quality gate for real: add a trivial edit to one source file, run
CLAUDE_PROJECT_DIR="$PWD" .claude/hooks/quality-checks.sh, confirm it passes, then revert the edit.
9. Report
End with a table of what was filled, created, deleted and deferred, plus the verification results. Suggest committing the adaptation as its own PR.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

