agentleFS
daniel-kindldaniel-kindl/dkstack/skills/setup-dkstack/SKILL.md

setup-dkstack

Skill1 starsChanged 19 days agoMITView on GitHub

Use when a repository does not point to dkstack yet, or its pointer is broken or out of date. Connects a new or an existing repository to dkstack: adds or merges AGENTS.md, makes each agent client read it, installs the skills with the owner's OK and checks the result. Triggers: set up dkstack, add dkstack, use dkstack here.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the file does not exist, copy sample-AGENTS.md as AGENTS.md.

    line 19
  2. Very specific:

    If the file exists and has no dkstack URL, merge into it.

    line 20
  3. Very specific:

    If the file has a dkstack URL on a different version or tag, tell the owner.

    line 21
  4. Very specific:

    Check each project rule in the existing files against dkstack.

    line 22
  5. Very specific:

    Remove the project rule. The dkstack rule applies.

    line 23
  6. Very specific:

    Keep the project rule as an exception.

    line 24
  7. Very specific:

    Commit the change on a branch with the title docs: set up dkstack.

    line 38
  8. Distinctive:

    If you can start subagents, use one for step 4 when the existing files have many project rules.

    line 43
  9. Distinctive:

    Start each subagent with the setting below.

    line 51
  10. Distinctive:

    If you cannot start subagents, do the steps one at a time in the order of this skill.

    line 57
  11. Distinctive:

    Do not delete or overwrite project text without the owner's OK.

    line 61
  12. Very specific:

    Do not change dkstack from the consumer.

    line 62
  13. Very specific:

    Do not copy dkstack rules into the consumer.

    line 63

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

Set up dkstack

Use this skill to make a repository a consumer: a repository whose AGENTS.md points to dkstack. It works in a new repository and in an existing repository. It changes only the agent instruction files. To set up the commit, version and quality rules too, use bootstrap. Bootstrap starts with this skill.

Steps

  1. Find the current state. Look for these files at the repository root:
    • AGENTS.md, and the dkstack URL in it.
    • CLAUDE.md, and what it contains.
    • Other agent instruction files, for example GEMINI.md, .cursorrules, .cursor/rules/ or .github/copilot-instructions.md.
    • CONTEXT.md.
  2. Select the version. Use the v1 URL from sample-AGENTS.md. Pin a vX.Y.Z tag only when the owner asks for it. See the version rule.
  3. Write AGENTS.md:
    • If the file does not exist, copy sample-AGENTS.md as AGENTS.md. Write the project facts that you can find in the code, for example the test command. Do not invent a fact. If you cannot find a fact, leave the placeholder and tell the owner.
    • If the file exists and has no dkstack URL, merge into it. Add the pointer lines and the Exceptions section of sample-AGENTS.md at the top. Move the project text under Project facts. Do not delete project text.
    • If the file has a dkstack URL on a different version or tag, tell the owner. Change the URL only with the owner's OK.
  4. Check each project rule in the existing files against dkstack. For each rule that conflicts with a dkstack rule, ask the owner to select one:

    • Remove the project rule. The dkstack rule applies.
    • Keep the project rule as an exception. Record the dkstack rule, the project rule and the reason in the Exceptions section. See Precedence.

    A project rule that conflicts with safety cannot be an exception. Tell the owner, and remove it only with the owner's OK.

  5. Make each agent client read AGENTS.md. Ask the owner which clients the project uses. Then:
    • Claude Code: if CLAUDE.md does not exist, create it with the one line @AGENTS.md. If it exists, add the line @AGENTS.md at the top. Do not delete or overwrite its text. Apply step 4 to its rules.
    • Another client that does not read AGENTS.md: add one line to its file that tells the agent to read and follow AGENTS.md. Apply step 4 to its rules.
    • A client that reads AGENTS.md directly, for example Codex: no change.
  6. Optional: install the skills. Ask the owner first. The command downloads and runs a package. Use the commands in the README on the same version as the URL in AGENTS.md. Tell the owner that installed skills do not update by themselves. After a release, run npx skills update.
  7. Check the result:
    • The dkstack URL in AGENTS.md resolves, for example with curl -fsSI <url>.
    • Each file from step 5 points to AGENTS.md.
    • AGENTS.md keeps all project text from before. Compare it with git diff.
    • Each relative link in the changed files resolves.
    • Start a new agent session in the repository. Ask it which file or skill it reads first for a task. The answer names the triage skill. If it does not, fix the pointer files and ask again. If you cannot start a session, tell the owner that this check did not run.
  8. Commit the change on a branch with the title docs: set up dkstack. Follow start-issue and feature branches.
  9. Tell the owner the next step. A new repository often has no commit, version or quality rules. If the repository has none of these rules, continue with bootstrap from its step 2.

Subagents

If you can start subagents, use one for step 4 when the existing files have many project rules. Do steps 1 to 3 yourself. Then start one subagent with a brief that is complete without your context:

  • The paths of the existing agent instruction files from step 1.
  • The dkstack AGENTS.md and the section indexes that it links.
  • What to report: each project rule that conflicts with a dkstack rule, with its file and line and the link to the dkstack rule.
  • A word limit, for example 400 words.
  • This line: "Report to me only. Do not change files, ask the owner, commit, push, post, approve or merge."

Start each subagent with the setting below. The subagent guide maps each tier to a model.

  • Rule comparison: tier medium, effort high.

Then check each conflict at its file and line yourself. Ask the owner about each conflict in step 4. Do steps 5 to 9 yourself.

If you cannot start subagents, do the steps one at a time in the order of this skill.

Rules

  • Do not delete or overwrite project text without the owner's OK.
  • Do not change dkstack from the consumer. See Changes.
  • Do not copy dkstack rules into the consumer. The consumer links to them.
  • Record an exception only when the owner approves it.
  • A second run of this skill on a set-up repository changes nothing.

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.