xiaohongshu
xiaohongshu
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.
Full skill instructions
Reference for developing ALTO. Use URLs for authoritative docs, summaries for quick reference.
ALTO configures the devenv MCP server automatically. Use it for:
The MCP is available as devenv server. Use MCP tools to query it when you need:
| 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/ |
| 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 |
| 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 |
scripts.<name> = {
exec = ''
echo "script body"
'';
description = "Shown in devenv info";
};
${variable} for nix interpolation''$ to escape $ in bashtasks."namespace:name" = {
exec = ''
echo "task body"
'';
before = [ "devenv:enterShell" ]; # Run before shell entry
# after = [ "other:task" ]; # Run after another task
};
before includes enterShell)# devenv.yaml
inputs:
alto:
url: github:gonzaloetjo/alto
flake: false # Critical: native import mode
imports:
- alto # References the input name
flake: false = use devenv's native import systemalto.orchestrator| Type | When | Can Block | Receives |
|---|---|---|---|
| SessionStart | Session begins | No | {session_id, resume} |
| PreToolUse | Before tool runs | Yes | {tool, input, ...} |
| PostToolUse | After tool runs | No | {tool, result, ...} |
| Stop | Session ends | No | {session_id, ...} |
| SubagentStop | Agent completes | No | {agent, ...} |
| Notification | Claude notifies | No | {message, ...} |
| PermissionRequest | Permission asked | Yes | {tool, ...} |
claude.code.hooks.<name> = {
hookType = "PostToolUse"; # Required
matcher = "Bash"; # Tool name, or "*" for all
command = "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/script.py";
};
#!/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()
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.
'';
};
Read, Write, Edit, Bash, Grep, Glob, LS, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
Place SKILL.md in .claude/skills/<name>/
/<skill-name> or automatically by contextclaude.code.mcpServers.<name> = {
type = "stdio"; # or "http"
command = "devenv";
args = [ "mcp" ];
env = { DEVENV_ROOT = "."; };
};
claude.code.permissions = {
Bash = {
allow = [ "git:*" "npm:*" ];
deny = [ "rm -rf:*" "sudo:*" ];
};
Read = {
deny = [ ".env" "secrets/**" ];
};
};
| What | Where | Purpose |
|---|---|---|
| Module options | devenv.nix -> options.alto | All configurable settings |
| Scripts | devenv.nix -> scripts.* | Shell commands |
| Deploy task | devenv.nix -> tasks."alto:deploy" | File deployment |
| Agent configs | devenv.nix -> claude.code.agents | Agent wiring |
| Hook configs | devenv.nix -> claude.code.hooks | Hook wiring |
| Agent prompts | agents/*.md | Agent behavior |
| Hook logic | hooks/*.py | Hook implementation |
| Skills | skills/*/SKILL.md | Skill content |
| Setup orchestrator | templates/CLAUDE.md.setup | Human-interactive mode |
| Build orchestrator | templates/CLAUDE.md.build | Autonomous mode |
| Dev orchestrator | templates/CLAUDE.md.dev | ALTO development mode |
| User template | templates/default/ | nix flake init output |
| Architecture | ARCHITECTURE.md | Design docs |
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
# test project's devenv.yaml - use local path
imports:
- /absolute/path/to/alto
Then devenv shell to rebuild with local changes.
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
| Problem | Solution |
|---|---|
| jq escaping in nix | Use echo "$(jq ...)" not complex jq strings |
| Changes not applied | Run devenv shell again |
| Remote changes not applied | Use --refresh flag |
| Hook not running | Check settings.json, verify hookType matches |
| Files read-only | Expected - nix store symlinks |
'' strings)''$ -> $ (escape dollar)''' -> '' (escape quotes)\n -> literal \n (not newline)xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience