OXI-717/ai-native-toolkit / plugins/ctx/skills/ctx-init
ctx-init
VerifiedInitialize AGENTS.md + CLAUDE.md + rules/ in a code repo (fresh mode). Triggers on "/ctx-init", "init context", "scaffold AGENTS.md", or when user asks to set up project context in a new repo.
ctx-init — context initialization in a repo
Creates the ctx structure in the current repo:
AGENTS.mdfrom template with frontmatter (all@-imports are relative@./rules/...)CLAUDE.mdwith@AGENTS.mdimportrules/with copies of shared plugin rules (language,dates,git,no-secrets,no-public-names) plus project-specific stubs (stack,testing,boundaries,focus)
Both shared rules and templates exist in two language variants: en/ (English) and ru/ (Russian). The user picks one at init time. Shared rules are copied rather than imported via $PLUGIN_ROOT because Claude Code does not expand env variables in project-level @-imports (and this is needed for cross-agent compatibility: Codex/Gemini/Cursor all read the same AGENTS.md).
Input (ask the user before running)
- project — short name (e.g.
MYAPP,API,DOCS). - description — one line describing the project topic.
- language —
enorru(defaulten). Determines the language ofAGENTS.mdheaders, the 5 shared rule files (language,dates,git,no-secrets,no-public-names), and the 4 project stubs (stack,testing,boundaries,focus).
Procedure
Pre-flight checks:
pwdmust be the root of the repo being initialized.- If
AGENTS.mdalready exists — stop and tell the user that migration is not supported. Ask the user to rename the old file manually (mv AGENTS.md AGENTS.md.legacy) and callctx-initagain.
Actions (replace <LANG> with the chosen en or ru). Resolve the plugin root first — CLAUDE_PLUGIN_ROOT can be empty under Codex:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-<installed-plugin-root>}"
ctx-lint parses frontmatter with PyYAML. If python3 -c 'import yaml' fails, run the commands below as uv run --with pyyaml python3 … (or install it: python3 -m pip install pyyaml).
- Copy
$PLUGIN_ROOT/templates/<LANG>/AGENTS.md.templateto./AGENTS.md. - Substitute
{{PROJECT}},{{DESCRIPTION}}viased. - Copy
$PLUGIN_ROOT/templates/<LANG>/CLAUDE.md.templateto./CLAUDE.md. - Create
./rules/. - Copy shared rules:
$PLUGIN_ROOT/rules/<LANG>/*.mdto./rules/. - Copy project stubs:
$PLUGIN_ROOT/templates/<LANG>/stubs-repo-rules/*.mdto./rules/(without overwriting shared files). - Run
python3 $PLUGIN_ROOT/lib/ctx-lint.py <repo>— verify all@-imports resolve (0 errors). - Show the user what was created, and ask them to fill in
stack.md,testing.md,boundaries.md,focus.mdinside the projectrulesdirectory. - Do not commit automatically — user reviews and commits themselves.
Example invocation
User: /ctx-init
Agent: "Ready to initialize context. Answer 3 questions:
1. project name (MYAPP/API/DOCS/...)?
2. description (short project topic)?
3. language for rules and AGENTS.md headers (en/ru, default en)?"
After answers — executes steps 1–7 and shows the diff.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |