agentleFS
marinvchmarinvch/Cortex/skills/install-project/SKILL.md

install-project

Skill1 starsChanged 2 months agoMITView on GitHub

Stamp a plain-file codebase brain into one repo, scoped to that codebase and its dev cycle, with no engine and no Node. Triggers — "give this repo a brain", "set up the project brain".

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for a pre-existing engine-based AI OS: .ai-os/, .github/ai-os/ (especially its memory/), .github/agents/, .github/COPILOT_CONTEXT.md, …

    line 30
  2. Very specific:

    If any exist, stop. That memory store holds hand-verified knowledge a plain /install-project would silently discard.

    line 34
  3. Distinctive:

    Read, don't guess:

    line 41
  4. Very specific:

    test setup (jest/vitest/playwright) → how tests run

    line 45
  5. Very specific:

    Keep the root lean — overview plus a ## Area map routing table.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/install-project — give one repo its own brain

Scaffolds a per-codebase brain inside the target repo, so the AI knows that one codebase and helps run its development cycle (plan → implement → review).

Fully isolated in both directions: this never reads or writes the personal vault, and the vault never absorbs the repo's company code or data. If a durable, non-sensitive lesson is worth keeping personally, tell the user — they add it by hand. No automatic promotion.

Step 1 — Point at the repo

node "${CLAUDE_PLUGIN_ROOT}/tools/cortex-preflight.mjs"

root is the target repo — confirm it is the one the user meant, since everything below is relative to it, and a ritual invoked one directory off writes a plausible-looking brain into the wrong repo. profile says which world this machine serves; on home a work repo is refused here, and /cortex-profile is where that gets settled rather than re-argued in every ritual.

Step 2 — Check for an OLD engine first

Look for a pre-existing engine-based AI OS: .ai-os/, .github/ai-os/ (especially its memory/), .github/agents/, .github/COPILOT_CONTEXT.md, or an ai-os entry in .mcp.json / .vscode/mcp.json.

If any exist, stop. That memory store holds hand-verified knowledge a plain /install-project would silently discard. Tell the user, and offer /migrate-engine first — it harvests the memory into AGENTS.md before removing anything. Continue only once they decide; if they decline, warn that engine knowledge won't carry over.

Step 3 — Learn the codebase (read-only)

Read, don't guess:

  • package.json (deps + scripts) and the lockfile → framework, package manager, run/test/build
  • top-level folders + entry points → architecture and the directories that actually matter
  • README, tsconfig, lint/prettier config, CI files → conventions and tooling
  • test setup (jest/vitest/playwright) → how tests run

Summarize the findings back in 5–8 lines and ask the user to correct anything before you write.

Step 4 — Stamp the brain

Back up any existing AGENTS.md/CLAUDE.md to *.bak first. Then write, in order:

  1. AGENTS.md — the canonical project manual. Fill templates/AGENTS.md.template from the scan plus the user's corrections. Never invent stack details. Follow [[context-engineering]] while writing it.
  2. Cross-agent shims — see templates/cross-agent-shims.md. Every teammate's tool reads the same brain.
  3. Dev-cycle skills + decision log — see templates/dev-cycle-skills.md.

Step 5 — Offer scoped briefs for critical areas

From the scan, nominate the directories that are high-churn, security/data sensitive, or hold invariants an agent could break (auth, billing/webhooks, the data layer, a pipeline). Present the shortlist and ask which deserve their own deep brief. For each one picked, run /cortex-brief <dir>.

Keep the root lean — overview plus a ## Area map routing table; depth lives in the leaves. Only areas with a real gotcha or invariant earn a leaf.

Step 6 — Close

The brain files (AGENTS.md, .claude/, docs/decisions.md) are normally committed so the team shares them; if this repo should keep them private, tell the user to gitignore them.

Confirm what was written, then: "Open this repo in Claude Code and run /plan-feature when the ticket lands." Suggest growing ## Gotchas as they learn the codebase.

If the scan turned up setup a human has to do by hand — .env.example keys with no values, a secrets.* reference in .github/workflows/, a third-party dashboard the README sends you to — offer /wizard. It writes one script that walks a person through those steps and captures the values, which beats this brain describing them in prose that goes stale the first time a dashboard moves. Documenting a manual procedure and automating it are different jobs; doing the first here is not doing the second.

Rules

  • Idempotent — re-run to refresh after the codebase changes; back up before overwriting.
  • Scan before writing.
  • One repo = one brain. Never merge knowledge across repos.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.