Analyze a codebase to detect its language, framework, conventions, and CI gates. Run this on first use in a project to generate stack context that all coding principle skills reference. Use when the user says "detect stack," "analyze this project," or "what's this codebase using."
Analyze the current codebase and generate .agents/stack-context.md. Run this on first use in a project, or when the stack context is missing or stale.
Scan the project root for these signals:
Language — Count file extensions (.rs, .py, .ts, .go, .swift, .java, .rb, .cs, .ex, etc.). Primary = most files. Note secondary languages.
Framework — Read the package manifest:
Cargo.toml → check [dependencies] for axum, actix, rocket, sqlx, diesel, tokiopackage.json → check for react, next, svelte, express, fastify, prismago.mod → check for gin, echo, fiber, chi, sqlcpyproject.toml / requirements.txt → check for django, flask, fastapi, sqlalchemyGemfile → check for rails, sinatraPackage.swift → check for Vapor; scan for SwiftUI importsmix.exs → check for phoenix, ectoTests — Look for test directories, test file naming patterns, test config files.
CI gates — Scan .github/workflows/, .gitlab-ci.yml, etc. for blocking checks (format, lint, type check, test).
Conventions — Check for CLAUDE.md, AGENTS.md, CONTRIBUTING.md. Note directory structure and naming patterns.
Write .agents/stack-context.md — keep it short (under 40 lines):
# Stack Context
Generated: YYYY-MM-DD
## Stack
- **Language**: [primary] [version if pinned]
- **Framework**: [web framework], [db layer]
- **Build**: [build tool]
- **Test**: [test command + framework]
- **Lint**: [linter] [CI gate: yes/no]
- **Format**: [formatter] [CI gate: yes/no]
## Secondary Languages
- [language] ([what it's used for])
## Conventions
- Error handling: [pattern]
- Module structure: [pattern]
- Naming: [pattern]
- Tests: [where they live, how they're organized]
## CI Gates
- [list of blocking checks]
After writing the stack context, do not generate static reference files. Instead:
resolve-library-id then query-docs) to pull live documentationThe coding principle skills are language-agnostic by design. You are the bridge between the principles and the stack.
.agents/stack-context.md doesn't existSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer