aksk-init
Skill7 starsChanged 2 months agoMITView on GitHub
Per-repo AKSK initialization — scaffolds .agents/ and AGENTS.md baseline first, then openspec/openwiki init, routing/lifecycle and wiki contract. Verifies aksk-bootstrap is ready. Interactive with --yes fallback.
- Reads credentials
- Installs packages
In this repository8 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- aksk-bootstrapSkill
- docs-lintSkill
- learning-distillSkill
- task-closeoutSkill
- verify-installSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Verify that openspec and openwiki binaries resolve on PATH before any skill invokes them.
- Distinctive: line 48
Never creates the file, replaces content, or removes OpenWiki-owned sections.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
AKSK Init
Per-repo initialization. Verifies global tools (Node >=22, openspec/openwiki via aksk-bootstrap) then interactively scaffolds the repo.
Steps (non-interactive script; skill prompts)
- Scaffold
.agents/+ seedAGENTS.mdbaseline (init_agents_md.mjs) openspec initopenwiki --init— CLI, requiresOPENAI_API_KEY. Without a key, skip this step: the contract, routing, and ignore steps below attach onceopenwiki/exists, so rerun init after a keyedopenwiki --init. (There is no keyless CLI path; do not go looking for a "harness" — an OpenWiki-MCP-equipped agent may scaffoldopenwiki/conversationally, but that is outside this scripted lane.)- Attach routing + lifecycle (
attach_section.mjs) - Attach wiki contract (
attach_wiki_contract.mjs) - Install
.openwikiignore(init_openwikiignore.mjs, merge-not-clobber)
Each step prompts [Y/n/skip]; --yes / --non-interactive / AKSK_YES=1 uses defaults; no TTY falls back to INSTRUCT (print commands, no writes).
Repo lane inherits global openspec-* skills by default (openspec init always runs with --tools none, no repo-local skill generation). Opt-in only: --local-skills installs a repo-local copy for iteration.
node ~/.agents/skills/aksk-init/scripts/bootstrap-repo.mjs [repo-root] [--yes] [--local-skills]Wiki Contract
Goal
Own the peer-dependency preconditions between AKSK and the upstream tools:
- Attach the AKSK curation contract to an existing
openwiki/INSTRUCTIONS.mdwithout ever replacing OpenWiki-owned content. - Verify that
openspecandopenwikibinaries resolve on PATH before any skill invokes them.
This section is the original precondition provider now owned by the bootstrap change; bootstrap copies the finalized kit templates rather than defining its own.
Contract attachment
node ~/.agents/skills/aksk-init/scripts/attach_wiki_contract.mjs [repo-root]Behavior contract:
- Appends the curation section from
references/wiki-contract-template.mdbetween<!-- AKSK:WIKI-CONTRACT:BEGIN/END -->markers to an existingopenwiki/INSTRUCTIONS.md. - Never creates the file, replaces content, or removes OpenWiki-owned sections.
- Idempotent and self-updating: re-running is a no-op when the attached section matches the template; if the template changed, only the marked section is refreshed in place and nothing outside the markers is touched.
- Fail-fast: if
openwiki/INSTRUCTIONS.mdis missing, exits 2 naming the missing precondition and printing the verbatim prerequisiteopenwiki --init, with no writes. - Stub-aware: attaching below OpenWiki's default stub (
A code wiki for this repository.) is reported as such; downstream skills treat a file without the AKSK markers as no-contract.
Managed-section attachment
node ~/.agents/skills/aksk-init/scripts/attach_section.mjs [repo-root] [target-file-name] [template-name]One mechanism for N marker-delimited AKSK sections in root agent instruction files. Each template under references/ carries its own <!-- AKSK:<NAME>:BEGIN/END --> markers; markers are read from the template, not hard-coded.
| Template | Markers | Content |
routing-note-template.md (default) | AKSK:ROUTING | Thin discovery pointers into .agents/ and openwiki/ |
lifecycle-template.md | AKSK:LIFECYCLE | The self-improvement loop mandate (closeout -> distill -> prune) |
Behavior contract (all templates):
- Existing content is never replaced or removed; sections attach below it.
- Idempotent and self-updating: re-running is a no-op when the attached section matches the template; if the template changed, only the marked section is refreshed in place.
- A missing target file is created containing only the attached section - root router files have no upstream initializer, so this script is their owner of record.
- Unknown template name exits 2.
AGENTS.md baseline (FerroxLabs)
Deterministic seeding of the root AGENTS.md behavioral baseline. Composes with the bootstrap orchestrator — full idempotent order is:
1. Global lane in user scope: npm i -g @fission-ai/openspec@^1.11.0 openwiki@^0.4.3 (caret from `references/versions.json`)
2. init_agents_md (baseline, this section) → AGENTS.md baseline zone
3. OpenWiki block (OPENWIKI:START/END) via openwiki tooling
4. attach_section (AKSK:ROUTING + AKSK:LIFECYCLE) belowZoned layout in a fully bootstrapped AGENTS.md (each zone owned by one writer, ordered upstream-first):
| Zone | Markers | Owner |
| FerroxLabs behavioral baseline | AKSK:AGENTS-BASELINE:BEGIN/END | init_agents_md.mjs / refresh_agents_baseline.mjs |
| OpenWiki block | OPENWIKI:START/END | OpenWiki tooling |
| AKSK routing + lifecycle | AKSK:ROUTING, AKSK:LIFECYCLE | attach_section.mjs |
Seed initializer
node ~/.agents/skills/aksk-init/scripts/init_agents_md.mjs [repo-root] # seed when missing → exit 0
node ~/.agents/skills/aksk-init/scripts/init_agents_md.mjs [repo-root] --replace # overwrite with baseline
node ~/.agents/skills/aksk-init/scripts/init_agents_md.mjs [repo-root] --combine # stage for LLM mergeBehavior contract:
- Missing
AGENTS.md→ creates it containing the vendored baseline wrapped inAKSK:AGENTS-BASELINEmarkers including provenance header (source URL, capture date, MIT notice, refresh pointer). No network access. - Existing file with matching baseline block (trailing-whitespace/newline-at-EOF normalized) → no-op, exit 0.
- Existing non-matching file with no flag → exits 2, no writes, prints
Replace AGENTS.md with the FerroxLabs baseline, or combine both using the LLM?plus the two flags to encode each answer. Mirrors the fail-fast-with-remediation convention. --replace→ overwritesAGENTS.mdwith the marked baseline section. Follow with OpenWiki attach +attach_section.mjsto restore the other zones.--combine→ never modifies the original. Stagesexisting.md,baseline.md, and generatedCOMBINE.mdbrief under.agents/sessions/agents-md-combine/<timestamp>/and prints agent instructions to merge and write back.
Template lives at references/agents-md-baseline-template.md (markers read from template, not hard-coded). Vendoring keeps bootstrap offline-safe.
Baseline refresh
node ~/.agents/skills/aksk-init/scripts/refresh_agents_baseline.mjs # fetch upstream + swap baseline zone
node ~/.agents/skills/aksk-init/scripts/refresh_agents_baseline.mjs --check # validate upstream without writingFetches https://raw.githubusercontent.com/FerroxLabs/agents-md/main/AGENTS.md to temp, validates (non-empty, contains anchors Non-negotiables, Before writing code, Surgical changes, Goal-driven execution), then swaps only the content between AKSK:AGENTS-BASELINE markers in the vendored template, updating the capture date. Other zones byte-identical (template has only the baseline). Offline/failure → exits non-zero with remediation, previously vendored baseline remains byte-identical.
Bootstrap composition
Per-repo sequencing (scaffold+baseline first, then openspec/openwiki init, then routing/lifecycle/contract) now lives in aksk-init. Bootstrap only runs the global lane.
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.

