### Build Mode Examples Source: https://commandcode.ai/docs/design Provides examples of using the 'Build' modes: 'redesign' for visual changes, 'setup' for project context, and 'tokenize' for component extraction. ```bash /design redesign src/pages/Home.tsx # Full visual rework, logic untouched ``` ```bash /design setup # Create brief.md for this project ``` ```bash /design tokenize src/components/ # Extract tokens from repeated patterns ``` -------------------------------- ### Get a broad overview of a codebase Source: https://commandcode.ai/docs/workflows Use this prompt to get a high-level understanding of a project's structure, key packages, and entry points. Ensure Command Code is started in the project root. ```bash > give me a brief overview of this codebase — structure, key packages, and entry points ``` -------------------------------- ### Install a skill from a GitHub repository Source: https://commandcode.ai/docs/skills/commands Use this command to install a skill from a GitHub repository. You can specify a single-skill repo, a specific path within a repo, pick a skill from a multi-skill repo, or install from a specific branch. Skills can be installed to the current project or globally. ```bash cmd skills add acme/my-skills ``` ```bash cmd skills add acme/skills/path/to/skill ``` ```bash cmd skills add acme/multi-skills -s my-skill ``` ```bash cmd skills add acme/repo@branch ``` ```bash cmd skills add acme/repo --global ``` -------------------------------- ### Skill Folder with References Directory Example Source: https://commandcode.ai/docs/skills An example of a skill folder structure that includes the references/ subdirectory for organizing additional documentation like API references or troubleshooting guides. ```bash my-skill/ ├── SKILL.md └── references/ ├── API_REFERENCE.md ├── FORMS.md └── TROUBLESHOOTING.md ``` -------------------------------- ### Example Output - Project Push Source: https://commandcode.ai/docs/taste/commands/push Example output indicating a successful push of an entire project taste, showing the number of packages and learnings. ```bash ✓ Pushed project taste to commandcode.ai/aa/taste (3 packages, 15 learnings) ``` -------------------------------- ### Install IDE Extension Non-interactively Source: https://commandcode.ai/docs/core-concepts/ide-integration Use the `--ide-setup` flag for a non-interactive installation of the IDE extension. This is useful for scripting purposes. ```bash cmd --ide-setup ``` -------------------------------- ### Example Output - Individual Package Push Source: https://commandcode.ai/docs/taste/commands/push Example output for pushing an individual package, detailing the number of learnings added, updated, or unchanged. ```bash ✓ Pushed 'cli' to commandcode.ai/aa/taste (2 learnings added, 1 updated, 3 unchanged) ``` -------------------------------- ### Example: Add GitHub MCP Server from JSON Source: https://commandcode.ai/docs/mcp/quickstart This example demonstrates adding a GitHub MCP server using JSON configuration, specifying HTTP transport, URL, and an Authorization header. ```bash cmd mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer ghp_xxx"}}' ``` -------------------------------- ### Install WSL Source: https://commandcode.ai/docs/troubleshooting/windows Run this command in PowerShell as Administrator to install WSL 2 with Ubuntu by default. ```powershell wsl --install ``` -------------------------------- ### Skill Folder Structure Example Source: https://commandcode.ai/docs/skills An example of a skill folder structure, showing the placement of SKILL.md and the optional scripts/ subdirectory containing executable files. ```bash my-skill/ ├── SKILL.md └── scripts/ ├── extract.py └── process.sh ``` -------------------------------- ### Example Output of taste open Source: https://commandcode.ai/docs/taste/commands/open Confirms that the 'cli' taste package was successfully opened from the project. ```bash ✓ Opened 'cli' taste package from project ``` -------------------------------- ### Documentation Command Usage Source: https://commandcode.ai/docs/reference/slash-commands Example of how to invoke the documentation command. ```bash /docs function ``` -------------------------------- ### Project Scope Configuration Example Source: https://commandcode.ai/docs/mcp/manage Example of the `.mcp.json` file content when a server is added to the project scope. Sensitive information like OAuth client secrets is omitted. ```json { "mcpServers": { "stripe": { "transport": "http", "url": "https://mcp.stripe.com" } } } ``` -------------------------------- ### Install Community Skill Source: https://commandcode.ai/docs/skills/manage Installs a skill directly from a GitHub repository using the 'cmd skills add' command. ```bash cmd skills add https://github.com/remotion-dev/skills --skill remotion-best-practices ``` -------------------------------- ### Start Session with Initial Message Source: https://commandcode.ai/docs/reference/cli Starts an interactive session with a predefined initial message. This is useful for guiding the AI's first response. ```bash cmd "fix login redirect" ``` -------------------------------- ### Skill Folder with Assets Directory Example Source: https://commandcode.ai/docs/skills An example of a skill folder structure that includes the assets/ subdirectory for static resources such as template files, images, or database schemas. ```bash my-skill/ ├── SKILL.md └── assets/ ├── template.json ├── diagram.png └── schema.sql ``` -------------------------------- ### Skill Directory Structure Example Source: https://commandcode.ai/docs/skills/manage Illustrates the recommended organization for skills, with each skill in its own directory. ```tree .commandcode/skills/ ├── code-review/ │ └── SKILL.md ├── api-guidelines/ │ └── SKILL.md └── testing-patterns/ └── SKILL.md ``` -------------------------------- ### Editor Configuration Examples Source: https://commandcode.ai/docs/taste/commands/open Provides examples for setting the default editor environment variable in different shells and for various editors. After setting, restart your terminal or source the configuration file. ```bash # VS Code echo 'export EDITOR="code"' >> ~/.zshrc # Vim echo 'export EDITOR="vim"' >> ~/.zshrc # Nano echo 'export EDITOR="nano"' >> ~/.zshrc # Sublime Text echo 'export EDITOR="subl"' >> ~/.zshrc ``` -------------------------------- ### Install Command Code CLI Source: https://commandcode.ai/docs Install the Command Code CLI globally using npm. ```bash npm i -g command-code ``` -------------------------------- ### List all installed skills Source: https://commandcode.ai/docs/skills/commands This command lists all installed skills, categorized by project and global locations. Use the `--debug` flag to see details about skills that failed to load. ```bash cmd skills list ``` ```bash cmd skills list --debug ``` -------------------------------- ### Example: Add Notion MCP Server (HTTP) Source: https://commandcode.ai/docs/mcp/quickstart This is a concrete example of adding the Notion MCP server using HTTP transport. It specifies the server name as 'notion' and provides its URL. ```bash cmd mcp add --transport http notion https://mcp.notion.com/mcp ``` -------------------------------- ### Verify Command Code Installation Source: https://commandcode.ai/docs/quickstart Verify that Command Code has been installed correctly by checking its version. This command works on macOS and Linux. ```bash cmd --version ``` -------------------------------- ### IDE Setup Source: https://commandcode.ai/docs/reference/cli Connects your IDE to Command Code to share open files and selected lines. Refer to IDE integration documentation for more details. ```bash cmd --ide-setup ``` -------------------------------- ### Realistic Design Workflow Source: https://commandcode.ai/docs/design Outlines a step-by-step workflow for using the /design command, from initial setup and auditing to refinement and final passes. ```bash # 1. Set up project context /design setup # 2. Audit what exists /design checkup /design smell # 3. Refine with focused modes /design typeset src/components/Hero.tsx /design recolor /design relayout /design motion src/components/Button.tsx # 4. Tokenize and harden /design tokenize /design surface # 5. Final pass before shipping /design responsive /design finish ``` -------------------------------- ### Create Code Review User Skill Source: https://commandcode.ai/docs/skills/manage This example demonstrates creating a user-level skill for code reviews by creating its directory and `SKILL.md` file with detailed review checklist instructions. ```bash mkdir -p ~/.commandcode/skills/code-review cat > ~/.commandcode/skills/code-review/SKILL.md << 'EOF' --- name: code-review description: Perform thorough code reviews checking for bugs, security issues, and best practices --- # Code Review Checklist ## Security - [ ] No hardcoded credentials or API keys - [ ] Input validation on all user data - [ ] Proper authentication and authorization ## Code Quality - [ ] Clear, descriptive variable names - [ ] Functions do one thing well - [ ] No code duplication ## Performance - [ ] No unnecessary loops - [ ] Efficient data structures - [ ] Optimized queries ## Testing - [ ] Unit tests cover main functionality - [ ] Edge cases tested - [ ] Error conditions handled EOF ``` -------------------------------- ### Start in Auto-Accept Mode Source: https://commandcode.ai/docs/reference/cli Starts Command Code in auto-accept mode, which is an alias for `--permission-mode auto-accept`. This automatically accepts permissions. ```bash cmd --auto-accept ``` -------------------------------- ### Start in Plan Mode Source: https://commandcode.ai/docs/reference/cli Initiates Command Code in plan mode using the `--plan` flag. This mode is for generating and executing plans. ```bash cmd --plan ``` -------------------------------- ### Example output (valid) Source: https://commandcode.ai/docs/taste/commands/lint This output indicates that all checked taste files are valid, with no errors or warnings found. ```text taste.md ✓ File is valid cli/taste.md ✓ File is valid Summary: 0 errors, 0 warnings across 2 files ✓ All 2 taste files are valid ``` -------------------------------- ### Progressive Disclosure Example Source: https://commandcode.ai/docs/skills/best-practices Keep the main SKILL.md file concise by moving detailed content to separate reference files. This example shows how to link to external documentation for API guidelines. ```markdown # API Guidelines Quick reference of our API patterns. For complete documentation, see: - [Authentication details](references/AUTH.md) - [Error handling guide](references/ERRORS.md) - [Versioning strategy](references/VERSIONING.md) ``` -------------------------------- ### Skill Description Example Source: https://commandcode.ai/docs/skills/best-practices Use specific and keyword-rich descriptions to help Command Code determine when to use a skill. This example shows how to extract text and tables from PDF files. ```yaml description: Extract text and tables from PDF files using pdfplumber. Use when user mentions PDFs, pdf files, document extraction, or needs to read PDF content. ``` -------------------------------- ### Natural Language Command Example Source: https://commandcode.ai/docs/mcp/quickstart An example of a natural language request that Command Code can process, demonstrating its ability to discover and use MCP tools. ```bash Create a note on Notion named "API Design v2". ``` -------------------------------- ### Describe Plan for Building Source: https://commandcode.ai/docs/workflows Use this prompt in plan mode to describe the desired feature, such as designing a role-based access control system, and explore the current setup. ```bash > design a role-based access control system for the API — explore the current auth setup first ``` -------------------------------- ### Explore codebase architecture Source: https://commandcode.ai/docs/workflows After getting an overview, use this prompt to understand the architecture patterns and module connections within the codebase. This helps in grasping how different parts of the system interact. ```bash > explain the architecture patterns used here and how the modules connect ``` -------------------------------- ### Start Command Code in Auto-Accept Mode (Long Form) Source: https://commandcode.ai/docs/resources/security An alternative, more explicit way to start a Command Code session in 'auto-accept' mode. ```bash cmd --permission-mode auto-accept ``` -------------------------------- ### Start Session with Specific Model Source: https://commandcode.ai/docs/core-concepts/interactive-mode Use the `--model` flag to start a session with a specific model. This is a session-scoped override and does not change the saved default. ```bash cmd --model ``` -------------------------------- ### Example Custom Agent File Source: https://commandcode.ai/docs/core-concepts/custom-agents Defines a custom agent named 'security-review' with specific tools and a system prompt for security-focused reviews. This file should be placed in the .commandcode/agents/ or ~/.commandcode/agents/ directory. ```markdown --- name: "security-review" description: "Use for dependency and secret-scanning review before release." tools: "glob, grep, read_file, think" --- You are a security-focused reviewer. Prioritize dependency risks, secrets in code, and unsafe patterns. Be concise; cite file paths and lines. ``` -------------------------------- ### Skill Name Examples Source: https://commandcode.ai/docs/skills/best-practices Prefer task-oriented skill names that are unlikely to conflict with built-in commands or custom commands. Safe examples include 'pr-desc', 'api-guidelines', 'release-notes', and 'code-review'. ```yaml Safe: pr-desc, api-guidelines, release-notes, code-review Risky: clear, help, share, rewind — these are built-in. ``` -------------------------------- ### List Global Packages Source: https://commandcode.ai/docs/taste/commands/list Lists all taste packages installed globally in `~/.commandcode/taste/`. Use the `-g` or `--global` flag to access these packages. ```bash npx taste list -g ``` -------------------------------- ### Configure Multiple Hooks for an Event Source: https://commandcode.ai/docs/hooks/configuration This example shows how to wire multiple hooks under a single matcher for the 'PreToolUse' event. The hooks execute sequentially, with subsequent hooks being skipped if an earlier hook denies the action. ```json { "hooks": { "PreToolUse": [ { "matcher": "shell", "hooks": [ { "type": "command", "command": "./.commandcode/hooks/guard-bash.sh", "timeout": 5 }, { "type": "command", "command": "./.commandcode/hooks/log-shell.sh" } ] } ] } } ``` -------------------------------- ### Auto-install Command Code Extension Source: https://commandcode.ai/docs/core-concepts/ide-integration Launch Command Code from your IDE's integrated terminal to automatically install the extension. This is the recommended method. ```bash cmd ``` -------------------------------- ### Start Command Code Session Source: https://commandcode.ai/docs/mcp/quickstart Initiates a Command Code session, allowing you to interact with configured MCP servers and tools. ```bash cmd ``` -------------------------------- ### Example output (with errors) Source: https://commandcode.ai/docs/taste/commands/lint This output shows validation failures, detailing the number of errors, specific line numbers, and the nature of the problems found. ```text cli/taste.md ✗ 2 errors found Line 5: Invalid confidence value (must be between 0 and 1) Line 12: Missing required header Summary: 2 errors, 0 warnings across 1 file ✗ Validation failed ``` -------------------------------- ### Example Taste File Structure (TypeScript) Source: https://commandcode.ai/docs/skills/skills-vs-taste Demonstrates the structure of a `taste.md` file, showing learned preferences for TypeScript, exports, and error handling. Confidence scores indicate the strength of observed patterns. ```markdown 1## TypeScript 2- Use strict mode. Confidence: 0.80 3- Prefer explicit return types on exported functions. Confidence: 0.65 4- Use type imports for type-only imports. Confidence: 0.90 5 6## Exports 7- Use named exports. Confidence: 0.85 8- Group related exports in barrel files. Confidence: 0.70 9- Avoid default exports except for page components. Confidence: 0.85 10 11## Error Handling 12- Use typed error classes. Confidence: 0.85 13- Always include error codes. Confidence: 0.90 14- Log to stderr, not stdout. Confidence: 0.75 ``` -------------------------------- ### Connect IDE using /ide Command Source: https://commandcode.ai/docs/core-concepts/ide-integration Run the `/ide` slash command within a Command Code session to check connection status, install the extension if needed, and view diagnostic information. ```bash /ide ``` -------------------------------- ### Add Context7 MCP Server Source: https://commandcode.ai/docs/mcp/examples Adds the Context7 MCP server to connect to up-to-date developer documentation, dynamically fetching version-specific docs and code examples. ```bash cmd mcp add context7 -- npx -y @upstash/context7-mcp ``` -------------------------------- ### HTTP Server Configuration Schema Source: https://commandcode.ai/docs/mcp/manage Example of the configuration schema for an HTTP MCP server, including transport, URL, headers, and environment variables. ```json { "mcpServers": { "my-server": { "transport": "http", "enabled": true, "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer token" }, "env": { "API_KEY": "value" } } } } ``` -------------------------------- ### Placeholder Usage Example Source: https://commandcode.ai/docs/core-concepts/slash-commands Demonstrates how different placeholders capture arguments passed to a slash command. $1 and $2 capture the first and second arguments respectively, while $ARGUMENTS captures all arguments as a single string. ```bash /test unit Jest ``` -------------------------------- ### Stop Hook Execution Example Source: https://commandcode.ai/docs/hooks/examples Illustrates the output when a stop hook detects a 'DO NOT SHIP' marker, showing the error message and exit code. ```text Ran 1 stop hook └ Stop hook [./.commandcode/hooks/no-ship-gate.sh] exited 2: Remove these 'DO NOT SHIP' markers before finishing: [retry 1/3] ``` -------------------------------- ### Check npm Global Bin Directory Source: https://commandcode.ai/docs/troubleshooting/common-issues Determine the prefix directory where npm installs global packages. Ensure this directory's 'bin' subfolder is in your system's PATH. ```bash npm config get prefix ``` -------------------------------- ### Example Output of taste pull Source: https://commandcode.ai/docs/taste/commands/pull Illustrates the typical output message after a successful 'taste pull' operation, indicating the status of pulled learnings and the save location. ```bash ✓ Pulled 'cli' from saqib (1 learning added, 2 unchanged) Saved to: .commandcode/taste/cli/taste.md ``` -------------------------------- ### AGENTS.md Template Example Source: https://commandcode.ai/docs/core-concepts/memory This is a template for the AGENTS.md file, which allows you to define project overview, code style guidelines, architecture notes, and common workflows. Customize this template to suit your project's specific needs. ```markdown # Memory ## Project Overview See @README.md for project overview and @package.json for available npm/pnpm commands for this project. ## Code Style Guidelines - Use descriptive variable names - Follow existing patterns in the codebase - Extract complex conditions into meaningful boolean variables ## Architecture Notes Add important architectural decisions and patterns here. ## Common Workflows Document frequently used workflows and commands here. ``` -------------------------------- ### Verify Command Code Install in WSL Source: https://commandcode.ai/docs/troubleshooting/windows Check the installed version of Command Code within the WSL environment. ```bash cmdc --version ``` -------------------------------- ### Add MCP Server from JSON Configuration Source: https://commandcode.ai/docs/mcp/quickstart For complex setups, you can add an MCP server by providing its configuration as a JSON string. This allows for detailed settings like transport, URL, and headers. ```bash cmd mcp add-json my-server '{ "transport": "http", "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer ${API_KEY}" } }' ``` -------------------------------- ### Command Usage with Positional Arguments Source: https://commandcode.ai/docs/reference/slash-commands Demonstrates how to use the 'create-component' command, providing values for the $1, $2, and $3 placeholders. ```bash /create-component React Button "onClick and disabled props" ``` -------------------------------- ### Full Hook Script Example Source: https://commandcode.ai/docs/hooks/reference This bash script demonstrates a pre-tool-use hook that inspects the command input. It denies destructive commands like 'rm -rf /' and allows other commands while adding context. It reads session and command details from stdin, processes them using jq, and outputs a JSON payload to control execution flow and provide feedback to the model. ```bash #!/usr/bin/env bash set -euo pipefail # Read the entire stdin payload once. payload=$(cat) # Common fields on every event. session_id=$(printf '%s' "$payload" | jq -r '.session_id') cwd=$(printf '%s' "$payload" | jq -r '.cwd') event=$(printf '%s' "$payload" | jq -r '.hook_event_name') # Tool-call fields, present on every tool event. tool_name=$(printf '%s' "$payload" | jq -r '.tool_name') tool_display=$(printf '%s' "$payload" | jq -r '.tool_display_name') cmd=$(printf '%s' "$payload" | jq -r '.tool_input.command // ""') # Command Code also injects env vars for the same context. : "${COMMANDCODE_PROJECT_DIR:?}" : "${COMMANDCODE_SESSION_ID:?}" : "${COMMANDCODE_HOOK_EVENT:?}" # Deny a destructive command with a reason the model will see. if [[ "$cmd" == *"rm -rf /"* ]]; then jq -n --arg cmd "$cmd" '{ \ continue: true, \ systemMessage: "Blocked destructive command", \ hookSpecificOutput: { \ hookEventName: "PreToolUse", \ permissionDecision: "deny", \ permissionDecisionReason: ("Policy forbids: " + $cmd) \ } \ }' exit 0 fi # Otherwise allow and attach extra context for the model's next turn. jq -n --arg event "$event" '{ \ continue: true, \ hookSpecificOutput: { \ hookEventName: "PreToolUse", \ permissionDecision: "allow", \ additionalContext: ("Verified by guard-shell.sh during " + $event) \ } \ }' ``` -------------------------------- ### Focused Skill Examples Source: https://commandcode.ai/docs/skills/best-practices Each skill should perform a single, well-defined task. Examples of focused skills include 'code-review', 'commit-messages', and 'testing-patterns'. ```yaml * `code-review` - Code review checklist * `commit-messages` - Commit message format * `testing-patterns` - Testing conventions ``` -------------------------------- ### Command Usage with $ARGUMENTS Source: https://commandcode.ai/docs/reference/slash-commands Demonstrates how to use the 'explain' command, passing a query as a single string argument that will be captured by $ARGUMENTS. ```bash /explain how async await works in JavaScript ``` -------------------------------- ### Example of feeding stderr to the model on retry Source: https://commandcode.ai/docs/hooks/reference When a hook exits with code 2, its stderr is fed to the model. This example shows how to simulate this by echoing a message to stderr. ```shell echo "tsc: 3 errors found" >&2 exit 2 ``` -------------------------------- ### Enter Plan Mode Source: https://commandcode.ai/docs/workflows Initiates plan mode for exploring the codebase and designing an implementation approach before making any file changes. ```bash cmd --plan ``` -------------------------------- ### Interactive Conversation Picker Example Source: https://commandcode.ai/docs/workflows An example of the interactive picker interface for selecting a past conversation, showing details like modification time, message count, and summary. ```text Modified # Messages Git Branch Summary ❯ 1. 20 hours ago 172 main Follow this practice and up... 2. 21 hours ago 13 main Add the common workflows he... 3. 22 hours ago 2 main does this {src/components/u... 4. 22 hours ago 82 main pnpm dlx shadcn@latest add ... 5. 1 day ago 2 ankit/features all tools support you have 6. 2 days ago 20 ankit/commands Update the content in each ... ``` -------------------------------- ### Create User-Level Skill Directory and SKILL.md Source: https://commandcode.ai/docs/skills/manage This command creates a directory for a user-level skill and a basic `SKILL.md` file with name and description metadata. ```bash # Create the directory mkdir -p ~/.commandcode/skills/my-skill # Create the SKILL.md file cat > ~/.commandcode/skills/my-skill/SKILL.md << 'EOF' --- name: my-skill description: What this skill does and when to use it --- # My Skill Instructions for Claude... EOF ``` -------------------------------- ### Open a Local Taste Package Source: https://commandcode.ai/docs/taste/commands/open Opens the 'cli' taste package from your local project directory in your default editor. ```bash npx taste open cli ``` -------------------------------- ### Basic Usage of taste open Source: https://commandcode.ai/docs/taste/commands/open Use this command to open a specified taste package in your default editor. Replace `` with the name of the package. ```bash npx taste open ``` -------------------------------- ### Initialize AGENTS.md File Source: https://commandcode.ai/docs/core-concepts/memory Use the `/init` command to create a new AGENTS.md file in your project root. This file serves as a template for customizing Command Code's behavior for your project. Remember to commit this file to your Git repository. ```bash /init ``` -------------------------------- ### Invalid Skill Names Source: https://commandcode.ai/docs/skills/manage Examples of bad skill names that violate the naming conventions. ```text CodeReview # uppercase not allowed code_review # underscores not allowed -code-review # cannot start with hyphen code--review # consecutive hyphens ``` -------------------------------- ### Pull from Global Source: https://commandcode.ai/docs/taste/commands Retrieves a taste package from your global configuration into the current project. Use the -g flag. ```bash npx taste pull cli -g ``` -------------------------------- ### Standard vs. Conditioned Generation Source: https://commandcode.ai/docs/skills/skills-vs-taste Illustrates the difference between standard LLM generation and conditioned generation using taste. Conditioned generation shapes the output distribution based on user-specific constraints. ```text 1// Standard generation 2output = LLM(prompt) 3 4// Conditioned generation with taste 5output = LLM(prompt | taste(user)) ``` -------------------------------- ### Get Specific MCP Server Details Source: https://commandcode.ai/docs/mcp/quickstart Inspect the configuration and status of a particular MCP server by its name. ```bash cmd mcp get notion ``` -------------------------------- ### Create API Guidelines Skill Source: https://commandcode.ai/docs/skills/manage Creates a new skill directory for API guidelines and defines its metadata and content in SKILL.md. ```bash mkdir -p .commandcode/skills/api-guidelines cat > .commandcode/skills/api-guidelines/SKILL.md << 'EOF' --- name: api-guidelines description: API design patterns and conventions for this project --- # API Guidelines ## Endpoint naming - Use plural nouns: `/users`, `/posts` - Use kebab-case: `/user-profiles` - Version in URL: `/v1/users` ## Response format Always return JSON with this structure: ```json { "data": { ... }, "meta": { "count": 10, "page": 1 }, "errors": [] } ``` ## Error codes - 400: Bad request (validation errors) - 401: Unauthorized (missing/invalid token) - 403: Forbidden (insufficient permissions) - 404: Not found - 500: Server error ## Authentication All endpoints require Bearer token in Authorization header except: - POST /v1/auth/login - POST /v1/auth/register EOF ``` -------------------------------- ### Valid Skill Names Source: https://commandcode.ai/docs/skills/manage Examples of good skill names adhering to the naming conventions (lowercase, numbers, hyphens). ```text code-review api-guidelines testing-patterns commit-messages ``` -------------------------------- ### Comment on Pull Request Source: https://commandcode.ai/docs/workflows Add a comment to a pull request, for example, to note missing error handling in a specific handler. ```bash > add a comment on the PR about the missing error handling in the webhook handler ``` -------------------------------- ### Create Project-Level Skill Directory and SKILL.md Source: https://commandcode.ai/docs/skills/manage This command creates a directory for a project-level skill within the project's `.commandcode/skills/` directory and a basic `SKILL.md` file. ```bash # Create the directory mkdir -p .commandcode/skills/my-skill # Create the SKILL.md file cat > .commandcode/skills/my-skill/SKILL.md << 'EOF' --- name: my-skill description: What this skill does and when to use it --- # My Skill Instructions for Claude... EOF ``` -------------------------------- ### Run Command Code in Project Source: https://commandcode.ai/docs Navigate to your project directory and run the Command Code CLI. ```bash cd your-project && cmd ``` -------------------------------- ### Lint all packages from global Source: https://commandcode.ai/docs/taste/commands/lint Validates all taste packages installed globally. This command checks all taste packages available in your global environment. ```bash npx taste lint --all -g ``` -------------------------------- ### Basic Usage of taste pull Source: https://commandcode.ai/docs/taste/commands/pull Demonstrates the fundamental syntax for pulling a taste package from a remote namespace and package. ```bash npx taste pull / [options] ``` -------------------------------- ### Lint a specific package from global Source: https://commandcode.ai/docs/taste/commands/lint Validates a specific taste package installed globally. Use this to check globally available packages. ```bash npx taste lint cli -g ``` -------------------------------- ### List Project Packages Source: https://commandcode.ai/docs/taste/commands/list Lists all taste packages within the current project's `.commandcode/taste/` directory. This is the default behavior when no options are specified. ```bash npx taste list ``` -------------------------------- ### List Available Models Source: https://commandcode.ai/docs/core-concepts/interactive-mode Run `cmd --list-models` to see all available model IDs that can be used. ```bash cmd --list-models ``` -------------------------------- ### Push Individual Package to Global Source: https://commandcode.ai/docs/taste/commands/push Uploads a specific package to the global taste directory on the local machine, making it accessible across all projects. ```bash npx taste push cli -g ``` -------------------------------- ### Open Skills Browser Source: https://commandcode.ai/docs/skills/manage Use the `/skills` command in an interactive session to open the skills browser. Navigate with arrow keys and press Enter to open a skill in the editor. ```bash # In Command Code interactive session /skills ``` -------------------------------- ### Manage Disabled Skills Configuration Source: https://commandcode.ai/docs/skills/manage Disabled skills are tracked in a `settings.json` file. This JSON snippet shows an example of how to list disabled skills. ```json { "disabledSkills": ["blogster", "r0"] } ``` -------------------------------- ### Open a Global Taste Package Source: https://commandcode.ai/docs/taste/commands/open Opens the 'cli' taste package from your global taste directory (~/.commandcode/taste) in your default editor. ```bash npx taste open cli -g ``` -------------------------------- ### Summarize Changes Source: https://commandcode.ai/docs/workflows Use this command to get a summary of changes made to a specific module, useful for reviewing code before creating a pull request. ```bash > summarize the changes I've made to the auth module and check for anything I missed ``` -------------------------------- ### Run First Prompt with Command Code Source: https://commandcode.ai/docs/quickstart Execute your first prompt in Command Code to build a date.js CLI using commander.js and pnpm. ```bash Build a date.js CLI that tells ISO format of date. Use commander.js and pnpm. ``` -------------------------------- ### Set External Editor Environment Variable Source: https://commandcode.ai/docs/workflows Configures the default external editor for CommandCode AI. Examples include 'vim' or 'code --wait'. ```bash export EDITOR=vim ``` ```bash export EDITOR="code --wait" ``` -------------------------------- ### Open External Editor for Prompts Source: https://commandcode.ai/docs/workflows Opens your configured external editor for writing multi-line prompts. This is useful for complex prompts including code examples. ```bash ctrl+g ``` -------------------------------- ### Referencing Supporting Files in SKILL.md Source: https://commandcode.ai/docs/skills/manage Demonstrates how to link to supporting documentation and execute scripts from within the SKILL.md file. ```markdown See [API Reference](references/API_REFERENCE.md) for details. Run the validation script: ```bash scripts/validate.sh ``` ``` -------------------------------- ### Push and Make Public Source: https://commandcode.ai/docs/taste/commands/push Uploads the package and makes it publicly discoverable by other Command Code users. ```bash npx taste push cli --public ``` -------------------------------- ### MCP Tool Naming Convention Source: https://commandcode.ai/docs/mcp MCP tools follow the naming convention `mcp____`. Examples include `mcp__notion__search_page` and `mcp__github__create_issue`. ```bash mcp__notion__search_page mcp__github__create_issue ``` -------------------------------- ### Using Quoted Arguments in Slash Commands Source: https://commandcode.ai/docs/core-concepts/slash-commands Arguments containing spaces must be wrapped in quotes. This example shows how arguments are parsed into numbered placeholders. ```bash /create-component React "Login Form" "email validation and submit handler" ``` -------------------------------- ### Create a User-Level Command Source: https://commandcode.ai/docs/reference/slash-commands This command creates a user-level slash command named 'understand'. It is saved in the ~/.commandcode/commands/ directory and is available across all projects. ```bash # Create a user-level command mkdir -p ~/.commandcode/commands echo "I am currently being onboarded on this project, help me understand it." > ~/.commandcode/commands/understand.md ``` -------------------------------- ### Managing Taste Profiles with CLI Source: https://commandcode.ai/docs/skills/skills-vs-taste Shows commands for interacting with taste profiles using the `taste` CLI. This includes pushing local taste to a registry and pulling shared taste profiles into a project. ```bash 1# Push your project taste to the registry 2npx taste push --all 3 4# Pull someone's CLI taste into your project 5npx taste pull ahmadawais/cli ``` -------------------------------- ### Example Trace ID for Bug Reporting Source: https://commandcode.ai/docs/troubleshooting/telemetry When reporting bugs, Command Code may display a Trace ID. Share this ID to help with issue investigation. ```text Trace ID: abc123... ``` -------------------------------- ### Configure Command Code Settings Source: https://commandcode.ai/docs/core-concepts/interactive-mode Modify Command Code's behavior by editing the `settings.json` file. This example shows how to disable the collapsing of pasted text. ```json { "input": { "collapsePastedText": false } } ``` -------------------------------- ### Get Design Review and Critique Source: https://commandcode.ai/docs/design Provides a scored critique of a specified page or component, including a walkthrough and suggested fixes. Ideal for detailed feedback before shipping. ```bash /design review src/pages/landing.tsx ``` -------------------------------- ### Design Command Usage Source: https://commandcode.ai/docs/design Illustrates the basic usage of the /design command, including its modes and optional target arguments. Freeform prompts are also supported. ```bash /design [target] Freeform prompts work too: /design make this hero stronger /design help shows the full usage guide ``` -------------------------------- ### Adding Supporting Files to a Skill Source: https://commandcode.ai/docs/skills/manage Shows how to include additional files like scripts, references, and assets within a skill's directory. ```tree my-skill/ ├── SKILL.md # Required ├── scripts/ # Executable code │ ├── process.py │ └── validate.sh ├── references/ # Additional docs │ ├── API_REFERENCE.md │ └── EXAMPLES.md └── assets/ # Templates, resources ├── template.json └── schema.sql ``` -------------------------------- ### Reference a directory for structure explanation Source: https://commandcode.ai/docs/workflows Include directories using '@' to understand their structure and how files within them relate. This is useful for grasping the organization of API routes or other modules. ```bash > look at @src/app/api and explain the route structure ```