smithery.ai

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.

First seen Apr 5, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 7,055 B
  • docs SUMMARY.md 197 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

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)

Claude Code (authoritative)

Community resources


Devenv Quick Reference

Scripts

scripts.<name> = {
  exec = ''
    echo "script body"
  '';
  description = "Shown in devenv info";
};
  • Available as commands in shell
  • Use ${variable} for nix interpolation
  • 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 before includes enterShell)
  • 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
  • flake: false = use devenv's native import system
  • ALTO activates on import, configure with alto.orchestrator

Claude Code Quick Reference

Hook Types

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, ...}

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 /<skill-name> or automatically by context
  • 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 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

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 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

Nix String Escaping ('' strings)

  • ''$ -> $ (escape dollar)
  • ''' -> '' (escape quotes)
  • \n -> literal \n (not newline)
  • Use actual newlines for line breaks