opencode-skill-creator
AGENTS.md192 starsChanged 13 days agoApache-2.0View on GitHub
Project agent rules. Do not rely on memory. Re-read the applicable DOX chain in the current session before editing. Every meaningful change requires a DOX pass before the task is done. Update the closest owning AGENTS.md when a change affects: Update parent docs when parent-level structure, ownership, workflow, or child index changes. Update child docs when parent changes alter local rules. Remove stale or contradictory text immediately. Small edits that do not change behavior or contracts may leave docs unchanged,…
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 19 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read the root AGENTS.md
- Distinctive: line 21
Read every AGENTS.md found along each route
- Distinctive: line 22
If a parent AGENTS.md lists a child AGENTS.md whose scope contains the path, read that child and continue from there
- Distinctive: line 23
Use the nearest AGENTS.md as the local contract and parent docs for repo-wide rules
- Distinctive: line 24
If docs conflict, the closer doc controls local work details, but no child doc may weaken DOX
- Distinctive: line 26
Do not rely on memory. Re-read the applicable DOX chain in the current session before editing.
- Distinctive: line 30
Every meaningful change requires a DOX pass before the task is done.
- Distinctive: line 32
Update the closest owning AGENTS.md when a change affects:
- Distinctive: line 51
Create a child AGENTS.md when a folder becomes a durable boundary with its own purpose, rules, responsibilities, workflow, materials, or …
- Distinctive: line 65
Keep docs concise, current, and operational
- Distinctive: line 66
Document stable contracts, not diary entries
- Distinctive: line 67
Put broad rules in parent docs and concrete details in child docs
- Distinctive: line 68
Prefer direct bullets with explicit names
- Distinctive: line 69
Do not duplicate rules across many files unless each scope needs a local version
- Distinctive: line 70
Delete stale notes instead of explaining history
- Distinctive: line 76
Update nearest owning docs and any affected parents or children
- Distinctive: line 78
Remove stale or contradictory text
- Distinctive: line 79
Run existing verification when relevant
- Distinctive: line 84
When the user requests a durable behavior change, record it here or in the relevant child AGENTS.md
- Very specific: line 99
Every test must tear down the listeners/servers/processes/temp resources it creates in a finally block (stop review servers, close any …
- Very specific: line 157
When an external contributor's code, tests, or design is adopted — reworked or not — credit the contributor by handle and reference the …
- Very specific: line 202
Read baseline/00-laws.md first.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md 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
AGENTS.md
Project agent rules.
<!-- DOX:BEGIN (canonical: github.com/agent0ai/dox AGENTS.md — always-latest copy; safe to edit/extend the block below, e.g. fill in Child DOX Index) -->DOX framework
- DOX is highly performant AGENTS.md hierarchy installed here
- Agent must follow DOX instructions across any edits
Core Contract
- AGENTS.md files are binding work contracts for their subtrees
- Work products, source materials, instructions, records, assets, and durable docs must stay understandable from the nearest applicable AGENTS.md plus every parent AGENTS.md above it
Read Before Editing
- Read the root AGENTS.md
- Identify every file or folder you expect to touch
- Walk from the repository root to each target path
- Read every AGENTS.md found along each route
- If a parent AGENTS.md lists a child AGENTS.md whose scope contains the path, read that child and continue from there
- Use the nearest AGENTS.md as the local contract and parent docs for repo-wide rules
- If docs conflict, the closer doc controls local work details, but no child doc may weaken DOX
Do not rely on memory. Re-read the applicable DOX chain in the current session before editing.
Update After Editing
Every meaningful change requires a DOX pass before the task is done.
Update the closest owning AGENTS.md when a change affects:
- purpose, scope, ownership, or responsibilities
- durable structure, contracts, workflows, or operating rules
- required inputs, outputs, permissions, constraints, side effects, or artifacts
- user preferences about behavior, communication, process, organization, or quality
- AGENTS.md creation, deletion, move, rename, or index contents
Update parent docs when parent-level structure, ownership, workflow, or child index changes. Update child docs when parent changes alter local rules. Remove stale or contradictory text immediately. Small edits that do not change behavior or contracts may leave docs unchanged, but the DOX pass still must happen.
Hierarchy
- Root AGENTS.md is the DOX rail: project-wide instructions, global preferences, durable workflow rules, and the top-level Child DOX Index
- Child AGENTS.md files own domain-specific instructions and their own Child DOX Index
- Each parent explains what its direct children cover and what stays owned by the parent
- The closer a doc is to the work, the more specific and practical it must be
Child Doc Shape
- Create a child AGENTS.md when a folder becomes a durable boundary with its own purpose, rules, responsibilities, workflow, materials, or quality standards
- Work Guidance must reflect the current standards of the project or user instructions; if there are no specific standards or instructions yet, leave it empty
- Verification must reflect an existing check; if no verification framework exists yet, leave it empty and update it when one exists
Default section order:
- Purpose
- Ownership
- Local Contracts
- Work Guidance
- Verification
- Child DOX Index
Style
- Keep docs concise, current, and operational
- Document stable contracts, not diary entries
- Put broad rules in parent docs and concrete details in child docs
- Prefer direct bullets with explicit names
- Do not duplicate rules across many files unless each scope needs a local version
- Delete stale notes instead of explaining history
- Trim obvious statements, repeated rules, misplaced detail, and warnings for risks that no longer exist
Closeout
- Re-check changed paths against the DOX chain
- Update nearest owning docs and any affected parents or children
- Refresh every affected Child DOX Index
- Remove stale or contradictory text
- Run existing verification when relevant
- Report any docs intentionally left unchanged and why
User Preferences
When the user requests a durable behavior change, record it here or in the relevant child AGENTS.md
Automated tests must not open the browser
- Automated tests, library use, and tool-based QA must never launch the user's
default browser. Pass
openBrowser: falsetoserveReview/skill_serve_reviewand/or setOPENCODE_SKILL_CREATOR_OPEN_BROWSER=0in the test process. - Interactive open uses a platform-specific launcher (
openon macOS,xdg-openon Linux and other Unix platforms,cmd /c start "" <url>on Windows), selected bybrowserOpenCommandinplugin/lib/review-server.ts. A missing launcher is best-effort: it must never crash the host — the review server stays up and reports the manual URL. - The interactive
skill_serve_reviewdefault staysopenBrowser: truefor the user-facing flow. Never flip that default for tests by editing the tool; opt out per call or via the environment. - Every test must tear down the listeners/servers/processes/temp resources it
creates in a
finallyblock (stop review servers, close any sockets, remove temp dirs). - Interactive QA uses exactly one Ego TaskSpace and reuses one page/tab per task; close only the pages the task created when it completes.
- Workers explicitly report their cleanup in the handoff (listeners, processes, temp dirs, browser pages). A worker that opened a browser page closes it before finishing; the lead verifies.
Review servers are owned per plugin instance and released on unload
- Review servers are owned by one plugin instance (
PluginInstance.servers), never a process-global map: one instance's cleanup must never close another instance's servers. - Both entrypoints release their own instance's servers when OpenCode unloads the
plugin: V1
server()returns hooks withdispose()(OpenCode ≥ 1.18.29 calls it on registry unload), and V2setup()keeps its existing returned cleanup closure. - The V1
disposeis idempotent (clear the owned map before the best-effort stops) and must not add process-globalSIGINT/exitlisteners or steal another process's port; a busy port still fails loudly.
Frontmatter reading, eval identity, and managed-install ownership
parseSkillMd(plugin/lib/utils.ts) reads a bounded block-scalar subset: indicator|/>, optional chomping (+/-), and optional explicit indent1-9in either order. Scalar values match the YAML reference for that subset (literal keeps breaks/indent/trailing spaces; folded folds adjacent lines and keeps blank lines and more-indented lines). Chomping mirrors the reference exactly:-strips all trailing breaks, default clips to one trailing break for a non-empty block, and+keeps every trailing break (including a blank-only block's blank lines). It is not a general YAML parser (no anchors, escapes, flow maps). CRLF is normalized in the description value only;fullContentbytes are unchanged.- Eval results are identified per eval-set item, never by query text:
runEvalaggregates by item index and returns one result per item in eval-set order, so duplicate queries keep their own labels/counts andrunLoopsplits train/test positionally against[...trainSet, ...testSet]. Do not re-key aggregation by query string or match the holdout split by query text. - The bundled-skill installer owns only the files it copied: it records them with
their sha256 in
.opencode-skill-creator-manifest.json(schema 1, internal metadata, not a public contract). The reserved root paths —SKILL.md,SKILL.md.user-backup, the version marker, and the manifest itself — are protected by name and are never tracked or pruned, regardless of any (even well-formed, hash-matching) manifest content. The protection is case-insensitive: every ASCII case variant of a reserved name (for exampleskill.mdon a case-insensitive filesystem) is treated as reserved too, so no manifest can name a case variant to reach a protected file. On upgrade it removes only a recorded, on-disk-unchanged regular file that the new bundle no longer ships and whose path stays inside the managed dir; it lstat-checks the managed dir root and every ancestor component and refuses to prune through any symlink. It must never delete user-authored, untracked, or locally-modified files or sibling skills. It writes the ownership metadata before advancing the version marker, so a metadata-write failure holds the old version and is reported viaonError(best-effort ordering, not an atomic two-file transaction). A legacy install without a manifest prunes nothing; tracking starts with the next verified copy. Never replace this with a blanket recursive wipe of the managed directory.
Credit adopted contributor work in release notes
- When an external contributor's code, tests, or design is adopted — reworked or
not — credit the contributor by handle and reference the source (PR/commit) in
the release notes and the commit trailer (
Co-authored-by:). - Credit only work actually adopted. Do not name contributors for ideas that were rejected or not merged, and do not hardcode a contributor into unrelated releases: derive the credit from the work each release actually contains.
- Release notes are authored during the release/delivery stage for the revision being published; keep the attribution truthful per release.
Child DOX Index
The root AGENTS.md owns cross-cutting repository rules. No child AGENTS.md files exist;
the areas below are described here and should get a child contract only when one becomes a
distinct ownership boundary.
plugin/— the OpenCode plugin (npm packageopencode-skill-creator): TypeScript source (skill-creator.ts,runtime-entry.ts,lib/), the committeddist/bundle, the installer CLI (bin/), the build script (scripts/build.mjs), and the test suites. Build withnpm run build; verify withnpm testandnpm run test:ts. The bundle must externalize@opencode-ai/pluginand@opencode/plugin(bun--external=<name>form) and never inlinenode_modules.opencode-skill-creator/— the bundled skill (SKILL.md,agents/,references/,templates/). Copied intoplugin/skill/and shipped in the package; edit both the source skill and the plugin copy when behavior changes.examples/— usage examples, not part of the published package.docs/installation.mdanddocs/tools.md— detailed public setup/recovery and tool contracts. Keep README onboarding short, preserve incoming README anchors, and use absolute public document links inplugin/README.mdfor npm rendering. Project registration still installs the bundled workflow skill at user level; document XDG/default paths accurately.docs/assets/— public documentation artwork.readme-hero.pngis the selected light paper-style README hero; keep its website link and descriptive alt text in the root README.docs/repo-publishing/— public assessment, metadata recommendations, and publication gates. Distinguish prepared work from verified publication; keep private evidence and account/local operational details out of public reports.llms.txtlinks public user resources only.CONTRIBUTING.md,SECURITY.md, and plain Markdown.github/templates — contributor checks, private reporting contact, and issue/PR guidance; no runtime automation in templates..github/workflows/—ci.yml(npm ci + build + tests on PRs),publish.yml(auto patch-version bump and npm publish onmain), andcode-review.yml(Robin).
<!-- DOX:END --><!-- BASELINE:BEGIN (managed by agents-md-bootstrap) -->Engineering baseline
This repo follows the baseline: ~/Code/700 systems/baseline (https://github.com/antongulin/baseline, private).
Read baseline/00-laws.md first; pillars 01–07 hold the law (workspace, agents, project,
stacks, infra, delivery, knowledge). Answer standards questions from those files, not memory.
Anything missing or broken against the baseline is surfaced loudly — never skipped (law 2).
<!-- BASELINE:END -->Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- llms.txtllms.txt
- opencode-skill-creatorSkill
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.

