source/skills/teach-chiron/SKILL.md
One-time comprehensive project scan. Reads every important file in the codebase and writes .chiron-context.md — the persistent context file that all other chiron skills reference instead of re-scanning.
npx skillsauth add xDido/chiron teach-chironInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run this once per project. It scans the full codebase and writes .chiron-context.md — a comprehensive reference that all other chiron skills read instead of re-scanning the project.
Re-run anytime to refresh the context (e.g., after major refactoring, adding new modules, or changing project structure).
$ARGUMENTS
If arguments are provided, treat them as a hint about what changed or what to focus on. Otherwise, do a full scan.
Check {{config_files}} first. If user instructions conflict with this command's behavior, follow the user.
node_modules/, vendor/, dist/, build/, .next/, target/, bin/, obj/package-lock.json, yarn.lock, go.sum, Cargo.lock, pom.xml dependency tree.wasm, .so, .dll.vscode/, .idea/, *.code-workspace.git/.claude/skills/, .cursor/skills/, etc. (don't scan yourself).min.js, bundle.*, webpack outputAsk: "If a mentor were onboarding to this project, would they need to read this file to give good advice?" If yes, include it. If it's just boilerplate they'd skip, skip it.
**/*.{go,rs,py,js,ts,jsx,tsx,java,cs,kt,swift,rb,ex,exs,zig,scala,clj}node_modules/**, vendor/**, dist/**, build/**, .next/**, target/**, bin/**, obj/**, __pycache__/****/*.{json,yaml,yml,toml,xml}, **/Makefile, **/Dockerfile*, **/docker-compose*, **/.env*node_modules~/.chiron/config.json if it exists (for voice level and drill config)Result: A complete file inventory. Count the source files. For projects with >100 source files, prioritize by the rules above.
package.json, go.mod, Cargo.toml, pom.xml, *.csproj, build.gradle, Package.swift, pyproject.toml, requirements.txt, Gemfile, mix.exsREADME.md or README.* (full file)CLAUDE.md, AGENTS.md, .cursorrules, GEMINI.md, .github/copilot-instructions.mdDockerfile, docker-compose.yml, .env.example, fly.toml, render.yaml, railway.json.github/workflows/*.yml, Makefile, Justfile, .gitlab-ci.yml, Jenkinsfiletsconfig.json, .eslintrc*, prettier*, rustfmt.toml, .golangci.yml, ruff.toml, .editorconfigRead files in this priority order. For each file, note: path, purpose (1 line), key exports/functions/classes.
main.go, cmd/*/main.go, src/main.*, app.py, manage.py, index.ts, index.js, server.*, Program.cs, App.kt, main.swift, lib.rsrouter, app.get, app.post, @app.route, @GetMapping, @Controller, HandleFunc, axum::RouterCREATE TABLE, @Entity, db.Model, Schema, migration, repositoryservices/, domain/, core/, internal/, lib/, src/config/, bootstrap/, startup.*, container.*types/, models/, dto/, proto/, api/*_test.go, *.test.ts, test_*.py, *Test.java, *Spec.ktFor large projects (>50 source files): You won't read every file. Read ALL files from categories 11-16, and a representative sample from each directory. The goal is complete coverage of architecture, not line-by-line reading.
.chiron-context.mdSynthesize everything into a comprehensive context file. Write to the project root:
# Chiron project context
Auto-generated by {{command_prefix}}teach-chiron — re-run to refresh. Delete to force a full rescan.
## Project
- **Name:** <project name from manifest>
- **Languages:** <all detected, primary first>
- **Framework:** <web framework, ORM, test framework, etc.>
- **Test runner:** <test command and framework>
- **Build system:** <build command and tool>
- **Package manager:** <with version if detectable>
- **Runtime:** <language version from manifest or config>
- **Repository:** <git remote URL if available>
## Dependencies (key libraries)
<ALL important dependencies grouped by category>
Format per group:
- **Category:** lib-name (version) — one-line purpose
Example:
- **HTTP:** gin v1.9 — web framework
- **DB:** sqlx v0.7 — async SQL toolkit
- **Auth:** jwt-go v5 — JWT token handling
- **Test:** testify v1.9 — assertions and mocking
## Directory structure
<full tree, 3 levels deep, with one-line descriptions for every directory>
Skip: node_modules, vendor, dist, build, .git, __pycache__
## Source file map
<every meaningful source file with a one-line description>
Format: `path/to/file.ext` — what it does, key exports
Skip generated/vendor/lock files. Group by directory.
## Entry points
<every way the application starts, with file paths>
- **HTTP server:** `cmd/api/main.go` — starts gin on :8080, loads routes from `internal/routes/`
- **CLI:** `cmd/cli/main.go` — cobra-based CLI with subcommands
- **Worker:** `cmd/worker/main.go` — background job processor
## API surface
<every HTTP route, gRPC service, CLI command, or public interface>
Format: `METHOD /path` → `handler_file.go:FunctionName` — description
Group by resource or domain.
## Data layer
- **Database:** <type — PostgreSQL, MongoDB, SQLite, etc.>
- **ORM/Driver:** <library used>
- **Models:** <list of model files with table/collection names>
- **Migrations:** <strategy — auto-migrate, manual SQL, tool-based>
- **Repositories:** <list of repo/DAO files>
## Architecture overview
<detailed prose — 5-10 sentences covering:>
- Monolith vs microservices
- API style (REST, gRPC, GraphQL, hybrid)
- Request flow (middleware → handler → service → repository → DB)
- Authentication/authorization approach
- Data flow and state management
- Caching strategy (if any)
- Message queue / async processing (if any)
- Error handling philosophy
- Deployment model (containers, serverless, bare metal)
## Key patterns and conventions
<every pattern observed — be specific with examples:>
- **Error handling:** <how errors are created, wrapped, returned, logged — cite specific files>
- **Naming:** <file naming, function naming, variable naming conventions>
- **Code organization:** <by feature, by layer, hybrid — describe the structure>
- **Testing:** <unit vs integration split, mocking approach (mocks vs real DB), fixture patterns, test naming>
- **Dependency injection:** <constructor injection, container, manual wiring — cite the setup file>
- **Logging:** <structured vs printf, log levels used, logger library>
- **Config management:** <env vars, config files, how secrets are handled>
- **Validation:** <input validation approach — middleware, decorators, manual>
- **API response format:** <standard envelope, error format, pagination style>
- **Database access:** <repository pattern, active record, raw SQL — cite examples>
## Infrastructure
- **Containerization:** <Docker setup, base images, multi-stage builds>
- **CI/CD:** <pipeline description — what runs, what deploys>
- **Environments:** <dev, staging, prod — how they differ>
- **Env vars:** <list from .env.example or equivalent, without values>
## Chiron config
- **Voice level:** <from ~/.chiron/config.json, or "default">
- **Drill sizing:** <from config, or "20 lines / 1 function / 5-15 min">
- **Teaching depth:** <from config teaching.depth, or "5">
- **Theory ratio:** <from config teaching.theory_ratio, or "3">
- **Idiom strictness:** <from config teaching.idiom_strictness, or "5">
## Project conventions (from AI config files)
<full relevant content from CLAUDE.md, AGENTS.md, .cursorrules — or "none found">
Confirm to the user:
.chiron-context.md instead of re-scanning. Run {{command_prefix}}teach-chiron again anytime to refresh."{{command_prefix}}chiron <your task> for guided help, or {{command_prefix}}tour <topic> for a quick overview of a concept before diving in."development
Structured "before each task" preamble for a coding topic. Presents read-this-first doc pointers, key concepts, and common junior mistakes. From chiron's session preamble pattern — gives you the mental model before you start writing code. For topic overviews, NOT tutorials.
development
Guided refactoring with named patterns. Identifies code smells, names the refactoring, and guides the transformation via a domain-adapted hint ladder. Defers to {{config_files_plain}}.
development
Session-end review of recent chiron activity. Scores across 5 axes (design thinking, code quality, idioms, testing, engineering maturity) and names one concrete thing to practice next time. Read-only in v0.3.0 — does not persist scores.
testing
Set or show chiron's voice level (gentle, default, or strict). Zero-arg invocation prints the full config snapshot — voice level plus drill sizing and teaching dials — doubling as a health check. Persists to ~/.chiron/config.json across sessions.