Claude-skill-registry alto-dev-guide
Use when developing ALTO itself - editing devenv.nix, hooks/*.py, agents/*.md, or checking Claude Code hook/agent syntax. Reference guide with documentation URLs and patterns.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/alto-dev-guide" ~/.claude/skills/majiayu000-claude-skill-registry-alto-dev-guide && rm -rf "$T"
manifest:
skills/data/alto-dev-guide/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- references .env files
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
ALTO Development Guide
Reference for developing ALTO. Use URLs for authoritative docs, summaries for quick reference.
Devenv MCP (always available)
ALTO configures the devenv MCP server automatically. Use it for:
- Package search - Find packages and their configuration options
- Config understanding - Understand devenv syntax and patterns
- Config generation - Generate valid devenv configurations
The MCP is available as
devenv server. Use MCP tools to query it when you need:
- What packages are available for a language/tool
- How to configure a specific service
- Valid options for a devenv setting
Documentation Sources
Devenv (authoritative)
| Topic | URL |
|---|---|
| All options | https://devenv.sh/reference/options/ |
| Scripts | https://devenv.sh/reference/options/#scripts |
| Tasks | https://devenv.sh/reference/options/#tasks |
| Imports | https://devenv.sh/composing-using-imports/ |
| Claude Code integration | https://devenv.sh/integrations/claude-code/ |
Claude Code (authoritative)
| Topic | URL |
|---|---|
| Hooks reference | https://code.claude.com/docs/en/hooks |
| Subagents | https://code.claude.com/docs/en/sub-agents |
| Skills | https://code.claude.com/docs/en/skills |
| CLI reference | https://code.claude.com/docs/en/cli-reference |
| Settings | https://code.claude.com/docs/en/settings |
Community resources
| Topic | URL |
|---|---|
| Full stack overview | https://alexop.dev/posts/understanding-claude-code-full-stack/ |
| Hooks mastery | https://github.com/disler/claude-code-hooks-mastery |
| Config showcase | https://github.com/ChrisWiles/claude-code-showcase |
Devenv Quick Reference
Scripts
scripts.<name> = { exec = '' echo "script body" ''; description = "Shown in devenv info"; };
- Available as commands in shell
- Use
for nix interpolation${variable} - Use
to escape''$
in bash$
Tasks
tasks."namespace:name" = { exec = '' echo "task body" ''; before = [ "devenv:enterShell" ]; # Run before shell entry # after = [ "other:task" ]; # Run after another task };
- Run automatically on shell entry (if
includes enterShell)before - Good for setup/deployment that should happen every time
Native Imports (not flakes)
# devenv.yaml inputs: alto: url: github:gonzaloetjo/alto flake: false # Critical: native import mode imports: - alto # References the input name
= use devenv's native import systemflake: false- ALTO activates on import, configure with
alto.orchestrator
Claude Code Quick Reference
Hook Types
| Type | When | Can Block | Receives |
|---|---|---|---|
| SessionStart | Session begins | No | |
| PreToolUse | Before tool runs | Yes | |
| PostToolUse | After tool runs | No | |
| Stop | Session ends | No | |
| SubagentStop | Agent completes | No | |
| Notification | Claude notifies | No | |
| PermissionRequest | Permission asked | Yes | |
Hook Configuration (devenv)
claude.code.hooks.<name> = { hookType = "PostToolUse"; # Required matcher = "Bash"; # Tool name, or "*" for all command = "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/script.py"; };
Hook Script Pattern
#!/usr/bin/env python3 import json, sys, os from pathlib import Path def main(): hook_data = json.load(sys.stdin) project_dir = Path(os.environ.get("CLAUDE_PROJECT_DIR", ".")) # Do work... # For SessionStart: print context for Claude to see print("Context message") if __name__ == "__main__": main()
Agents (devenv)
claude.code.agents.<name> = { description = "Shown when listing agents"; tools = [ "Read" "Edit" "Bash" "Grep" "Glob" "WebFetch" ]; model = "opus"; # or "sonnet", "haiku" prompt = '' Agent system prompt here. This defines behavior, not user request. ''; };
Available Tools
Read, Write, Edit, Bash, Grep, Glob, LS, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
Skills
Place
SKILL.md in .claude/skills/<name>/
- Invoked with
or automatically by context/<skill-name> - Content is instructions for Claude
MCP Servers
claude.code.mcpServers.<name> = { type = "stdio"; # or "http" command = "devenv"; args = [ "mcp" ]; env = { DEVENV_ROOT = "."; }; };
Permissions
claude.code.permissions = { Bash = { allow = [ "git:*" "npm:*" ]; deny = [ "rm -rf:*" "sudo:*" ]; }; Read = { deny = [ ".env" "secrets/**" ]; }; };
ALTO File Reference
| What | Where | Purpose |
|---|---|---|
| Module options | -> | All configurable settings |
| Scripts | -> | Shell commands |
| Deploy task | -> | File deployment |
| Agent configs | -> | Agent wiring |
| Hook configs | -> | Hook wiring |
| Agent prompts | | Agent behavior |
| Hook logic | | Hook implementation |
| Skills | | Skill content |
| Setup orchestrator | | Human-interactive mode |
| Build orchestrator | | Autonomous mode |
| Dev orchestrator | | ALTO development mode |
| User template | | output |
| Architecture | | Design docs |
Testing Workflows
Fresh install
mkdir /tmp/test && cd /tmp/test nix --extra-experimental-features 'nix-command flakes' flake init -t github:gonzaloetjo/alto --refresh devenv shell # Check: ls .claude/ runs/ CLAUDE.md
Local development
# test project's devenv.yaml - use local path imports: - /absolute/path/to/alto
Then
devenv shell to rebuild with local changes.
Verify deployment
ls -la .claude/agents/ # Symlinks to nix store ls -la .claude/hooks/ # Python files cat runs/state.json # ALTO state cat .claude/settings.json # Permissions + hooks
Common Issues
| Problem | Solution |
|---|---|
| jq escaping in nix | Use not complex jq strings |
| Changes not applied | Run again |
| Remote changes not applied | Use flag |
| Hook not running | Check settings.json, verify hookType matches |
| Files read-only | Expected - nix store symlinks |
Nix String Escaping (''
strings)
''
->''$
(escape dollar)$
->'''
(escape quotes)''
-> literal\n
(not newline)\n- Use actual newlines for line breaks