### Example SKILL.md Content
Source: https://forgecode.dev/docs/skills
An example of the content for a 'release-notes' skill, outlining a multi-step workflow.
```markdown
# Generate Release Notes
1. Run `./scripts/get-commits.sh` to collect commits since the last tag
2. Run `./scripts/categorize.sh` to group them into Features, Bug Fixes, and Breaking Changes
3. Write the release notes in `CHANGELOG.md` using the output from the scripts
4. Run `./scripts/validate-changelog.sh` to confirm the format is correct
```
--------------------------------
### Manual MCP Configuration Example
Source: https://forgecode.dev/docs/mcp-integration
Manually configure MCP servers by creating or editing the .mcp.json file. This example shows configurations for browser automation, an API service, and a webhook server.
```json
{
"mcpServers": {
"browser_automation": {
"command": "npx",
"args": ["@modelcontextprotocol/server-browser"],
"env": {
"BROWSER_EXECUTABLE": "/usr/bin/chromium-browser"
}
},
"api_service": {
"command": "python",
"args": ["-m", "mcp_server", "--port", "3001"],
"env": {
"API_KEY": "your_api_key_here",
"DEBUG": "true"
}
},
"webhook_server": {
"url": "http://localhost:3000/events"
}
}
}
```
--------------------------------
### Compare Vague and Specific Guidelines
Source: https://forgecode.dev/docs/custom-rules-guide
Examples demonstrating the difference between vague instructions and actionable, specific guidelines.
```markdown
# Guidelines
- Write good code
- Add tests
- Handle errors
# Guidelines
- Add error handling with try/catch blocks
- Include unit tests with arrange-act-assert pattern
```
--------------------------------
### Example user_prompt output
Source: https://forgecode.dev/docs/creating-agents
The resulting message format after the template is applied to user input.
```text
fix the bug
2026-04-01
```
```text
looks good, but also handle the edge case
2026-04-01
```
--------------------------------
### Run Forge Doctor and Setup Commands
Source: https://forgecode.dev/docs/zsh-support
Use these commands to check your environment for problems and re-run the ZSH integration setup. These commands resolve most common issues.
```bash
forge zsh doctor # checks your environment and reports problems
```
```bash
forge zsh setup # re-runs the ZSH integration setup
```
--------------------------------
### Verify ForgeCode Installation
Source: https://forgecode.dev/docs
Verifies that the ForgeCode CLI has been installed correctly by checking its help documentation.
```bash
forge --help
```
--------------------------------
### Configure Agent Tools
Source: https://forgecode.dev/docs/creating-agents
Examples of defining tool access, including specific lists, wildcard access, and MCP integration patterns.
```yaml
tools:
- read # Read files and directories
- write # Create and modify files
- patch # Apply targeted changes
- shell # Execute shell commands
- search # Search within files
- fetch # Retrieve external resources
- remove # Delete files
- undo # Reverse previous changes
```
```yaml
tools:
- "*" # All tools
```
```yaml
tools:
- read
- search
- "mcp_*" # All MCP tools — database, browser, APIs, etc.
```
--------------------------------
### Install ForgeCode Binary
Source: https://forgecode.dev/docs
Installs the ForgeCode CLI binary using curl. This command is compatible with macOS, Linux, Android, and Windows via WSL or Git Bash.
```bash
curl -fsSL https://forgecode.dev/cli | sh
```
--------------------------------
### Define AGENTS.md Development Guidelines
Source: https://forgecode.dev/docs/custom-rules
A comprehensive example of an AGENTS.md file covering runtime rules, package management, coding standards, and project structure.
```markdown
# Development Guidelines for MyApp
## 📋 Core Development Rules
### Application Runtime
- **NEVER** attempt to run the application - it's already running on port 3000 in watch mode
- The development server is persistent and handles hot reloading automatically
- Always assume the application is accessible at `http://localhost:3000`
### Package Management
- **Use**: `npm` or `npx` commands exclusively
- **Avoid**: `yarn` or `pnpm` - not used in this project
- Always check `package.json` for available scripts before running commands
### Code Quality Standards
- **TypeScript First**: All code must be type-safe with proper type definitions
- **Component Architecture**: Follow React functional components with hooks
- **Responsive Design**: Ensure all UI components work across devices
- **Error Handling**: Always wrap async operations in try-catch blocks
## 🛠️ Project Structure
```
├── src/
│ ├── components/ # Reusable React components
│ ├── pages/ # Next.js pages
│ ├── services/ # API calls and business logic
│ ├── utils/ # Helper functions
│ └── styles/ # Global styles and themes
├── public/ # Static assets
└── tests/ # Test files
```
## 🎯 Development Focus Areas
### API Integration
- All API calls must go through the `services/` directory
- Use the custom `apiClient` wrapper for consistent error handling
- Never hardcode API endpoints - use environment variables
### State Management
- Use React Context for global state
- Keep component state local when possible
- Avoid prop drilling - use context or composition
### Testing
- Write unit tests for all utility functions
- Use React Testing Library for component tests
- Aim for 80% code coverage on new features
## 🚫 Restrictions & Limitations
### What NOT to do:
- ❌ Run `npm start` or similar server commands (server is already running)
- ❌ Use `any` type in TypeScript
- ❌ Create non-responsive components
- ❌ Skip error handling in async functions
### What TO do:
- ✅ Use existing development server
- ✅ Write TypeScript-first code with proper types
- ✅ Follow mobile-first responsive design
- ✅ Add comprehensive error handling
- ✅ Write tests for new features
## 📝 Code Style
- Use functional components with hooks (no class components)
- Prefer `const` over `let`, avoid `var`
- Use arrow functions for callbacks
- Keep functions small and focused (max 50 lines)
- Use meaningful variable names (no single letters except loop counters)
## 🔍 Before Completing Any Task
- [ ] Code is TypeScript compliant with proper types
- [ ] Components are responsive and accessible
- [ ] Error handling is implemented
- [ ] No attempts to restart the development server
- [ ] Tests are written and passing
```
--------------------------------
### Configure Zsh Plugin
Source: https://forgecode.dev/docs
Runs the ForgeCode Zsh plugin setup wizard. After completion, the terminal must be restarted for the plugin to become active.
```bash
forge zsh setup
```
--------------------------------
### ForgeCode Configuration File Structure
Source: https://forgecode.dev/docs/forgecode-config
Example of the .forge.toml configuration file containing global settings, retry logic, HTTP client behavior, and context compaction parameters.
```toml
$schema https://forgecode.dev/schema.json
# Whether to automatically open HTML dump files in the browser
auto_open_dump = false
# Maximum number of conversations to show in list
max_conversations = 100
# Maximum number of file extensions to include in the system prompt
max_extensions = 15
# Maximum characters for fetch content
max_fetch_chars = 50000
# Maximum number of files that can be read in a single batch operation
max_file_read_batch_size = 50
# Maximum file size in bytes for operations
max_file_size_bytes = 104857600
# Maximum image file size in bytes for binary read operations
max_image_size_bytes = 262144
# Maximum characters per line for file read operations
max_line_chars = 2000
# Maximum number of files read concurrently in parallel operations
max_parallel_file_reads = 64
# Maximum number of lines to read from a file
max_read_lines = 2000
# Maximum number of requests that can be made in a single turn
max_requests_per_turn = 100
# The maximum number of lines returned for FSSearch
max_search_lines = 1000
# Maximum bytes allowed for search results
max_search_result_bytes = 10240
# Maximum number of results to return from initial vector search
max_sem_search_results = 100
# Maximum characters per line for shell output
max_stdout_line_chars = 500
# Maximum lines for shell output prefix
max_stdout_prefix_lines = 100
# Maximum lines for shell output suffix
max_stdout_suffix_lines = 100
# Maximum tokens the model may generate per response for all agents (1–100,000)
max_tokens = 20480
# Maximum tool failures per turn before the orchestrator forces completion
max_tool_failure_per_turn = 3
# TTL in seconds for the model API list cache
model_cache_ttl_secs = 604800
# Whether the application is running in restricted mode; when true, tool execution requires explicit permission grants
restricted = false
# Top-k parameter for relevance filtering during semantic search
sem_search_top_k = 10
# URL for the indexing server
services_url = "https://api.forgecode.dev/"
# Whether tool use is supported in the current environment; when false, tool calls are disabled regardless of agent configuration
tool_supported = true
# Maximum execution time in seconds for a single tool call
tool_timeout_secs = 300
# Top-k vocabulary cutoff for all agents; restricts sampling to the k highest-probability tokens (1–1000)
top_k = 30
# Nucleus sampling threshold for all agents; limits token selection to the top cumulative probability mass (0.0–1.0)
top_p = 0.8
[retry]
# Backoff multiplication factor for each retry attempt
backoff_factor = 2
# Initial backoff delay in milliseconds for retry operations
initial_backoff_ms = 200
# Maximum number of retry attempts
max_attempts = 8
# Minimum delay in milliseconds between retry attempts
min_delay_ms = 1000
# HTTP status codes that should trigger retries
status_codes = [429, 500, 502, 503, 504, 408, 522, 520, 529]
# Whether to suppress retry error logging and events
suppress_errors = false
[http]
# Accept invalid certificates
accept_invalid_certs = false
# Adaptive window sizing for improved flow control
adaptive_window = true
# Connection timeout in seconds
connect_timeout_secs = 30
# Use Hickory DNS resolver
hickory = false
# Keep-alive interval in seconds
keep_alive_interval_secs = 60
# Keep-alive timeout in seconds
keep_alive_timeout_secs = 10
# Keep-alive while connection is idle
keep_alive_while_idle = true
# Maximum number of HTTP redirects to follow
max_redirects = 10
# Connection pool idle timeout in seconds
pool_idle_timeout_secs = 90
# Maximum idle connections per host in the connection pool
pool_max_idle_per_host = 5
# Read timeout in seconds
read_timeout_secs = 900
# TLS backend to use ("default" or "rustls")
tls_backend = "default"
[compact]
# Maximum percentage of the context that can be summarized during compaction (0.0–1.0)
eviction_window = 0.2
# Maximum number of tokens to keep after compaction
max_tokens = 2000
```
--------------------------------
### Create Skill via Natural Language
Source: https://forgecode.dev/docs/skills
Example prompt to ForgeCode for generating a new skill based on a described workflow.
```text
Create a release-notes skill. It should collect all commits since the last tag,
group them by type — Features, Bug Fixes, Breaking Changes — write the notes to
the changelog, and run a validation check at the end.
```
--------------------------------
### Install ForgeCode VS Code Extension via CLI
Source: https://forgecode.dev/docs/vscode-extension
Use this command to install the ForgeCode extension directly from your command line. Ensure VS Code is in your system's PATH.
```bash
code --install-extension ForgeCode.forge-vscode
```
--------------------------------
### Log in to AI Provider
Source: https://forgecode.dev/docs
Initiates the login process for an AI provider. This command guides the user through selecting a provider and entering their API key.
```bash
:login
```
--------------------------------
### New Conversation with Inline Prompt
Source: https://forgecode.dev/docs/zsh-support
Start a new conversation and send an initial prompt simultaneously using ':new' followed by your prompt.
```shell
:new hi what's the time
```
--------------------------------
### Configure FORGE_BIN for Local Builds
Source: https://forgecode.dev/docs/forge-bin
Set the binary path to a local build directory for testing changes without system-wide installation.
```bash
export FORGE_BIN=/path/to/forgecode/target/debug/forge
```
--------------------------------
### Interpret Git Ignore Output
Source: https://forgecode.dev/docs/ignoring-files
Example output showing which file and line number in .gitignore is responsible for ignoring a path.
```text
.gitignore:3:node_modules/ node_modules/package/index.js
```
--------------------------------
### Define a Security Auditor Agent
Source: https://forgecode.dev/docs/creating-agents
Example of a minimal agent definition file with an ID, metadata, and system prompt.
```markdown
---
id: security-auditor
title: Security Auditor
description: Reviews code for vulnerabilities and recommends fixes
tools:
- read
- search
---
You are a security specialist focused on finding and fixing vulnerabilities.
Review code for injection flaws, authentication gaps, insecure data handling, and dependency risks. For every issue found, explain the risk and provide a specific fix with a code example.
```
--------------------------------
### Starting a New ForgeCode Conversation
Source: https://forgecode.dev/docs/zsh-support
Run ':new' to clear the current conversation history and start a fresh session. This prevents context from previous tasks from bleeding into new ones. The active agent remains the same.
```shell
:new
```
--------------------------------
### Basic AGENTS.md for Core Standards
Source: https://forgecode.dev/docs/custom-rules-guide
Define fundamental development principles like error handling, unit tests, and naming conventions. This serves as a starting point for teams new to project guidelines.
```markdown
# Development Guidelines
## Core Standards
- Add error handling to all functions
- Include unit tests for new code
- Use meaningful variable names
```
--------------------------------
### AGENTS.md with TypeScript and Error Handling
Source: https://forgecode.dev/docs/custom-rules-guide
Establish core development standards including TypeScript strict mode, error handling, unit tests, and variable naming. Recommended for teams starting with project guidelines.
```markdown
# Development Guidelines
## Core Standards
- Use TypeScript strict mode
- Add error handling to all functions
- Include unit tests for new code
- Use meaningful variable names
```
--------------------------------
### Initialize Agent Directories
Source: https://forgecode.dev/docs/creating-agents
Create the required directory structures for global or project-specific agents.
```bash
# Global
mkdir -p ~/forge/agents
# Project-specific
mkdir -p .forge/agents
```
--------------------------------
### Enable Semantic Sync for Project
Source: https://forgecode.dev/docs/forge-services
Execute this command to index your project and enable semantic search functionality. This is a prerequisite for using `sem_search`.
```bash
:sync
```
--------------------------------
### Verify Binary Path Configuration
Source: https://forgecode.dev/docs/forge-bin
Check the current path and verify the binary is executable and responsive.
```bash
echo $FORGE_BIN # shows the path you set
$FORGE_BIN --version # confirms the binary responds and shows its version
```
--------------------------------
### Typical Output of MCP Import
Source: https://forgecode.dev/docs/mcp-integration
This output indicates successful addition of MCP servers to your configuration. Each line confirms a server has been added.
```text
⏺ Added MCP server 'context7'
⏺ Added MCP server 'deepwiki'
⏺ Added MCP server 'playwright'
```
--------------------------------
### Enable ForgeCode Services
Source: https://forgecode.dev/docs/forge-services
Run this command to enable ForgeCode Services. After execution, select ForgeServices in the provider list and complete browser authentication. No API key is required.
```bash
:login
```
--------------------------------
### Show MCP Server Configuration
Source: https://forgecode.dev/docs/mcp-integration
Display the detailed configuration for a specific MCP server, including its command, arguments, and environment variables.
```bash
forge mcp show
```
--------------------------------
### Verify MCP tools
Source: https://forgecode.dev/docs/mcp-integration
Run this command to list all MCP tools currently available to the active agent.
```text
:tools
```
--------------------------------
### Initialize ZSH Integration
Source: https://forgecode.dev/docs/forge-bin
The command used by the ZSH plugin to source shell integration at startup.
```bash
source <($FORGE_BIN extension zsh)
```
--------------------------------
### Reload Zsh Session
Source: https://forgecode.dev/docs
Reloads the current Zsh session to activate the ForgeCode plugin after setup. This is necessary if the ':' prompt trigger is not working.
```bash
exec zsh
```
--------------------------------
### Revert to Default Binary
Source: https://forgecode.dev/docs/forge-bin
Remove the custom configuration to return to the system-installed forge binary.
```bash
unset FORGE_BIN
source <(forge extension zsh)
```
--------------------------------
### List Configured MCP Servers
Source: https://forgecode.dev/docs/mcp-integration
Use this command to view all MCP servers that are currently configured and available for use by your agents.
```bash
forge mcp list
```
--------------------------------
### CLI: forge mcp list
Source: https://forgecode.dev/docs/mcp-integration
Lists all currently configured MCP servers.
```APIDOC
## forge mcp list
### Description
Lists all configured MCP servers.
### Parameters
#### Options
- **--porcelain** (flag) - Optional - Enables machine-readable output.
```
--------------------------------
### ForgeCode Command Completion
Source: https://forgecode.dev/docs/zsh-support
Press TAB immediately after the ':' sentinel to open a command completion list. This allows you to switch agents, start new conversations, open the editor, and access other ForgeCode commands.
```shell
: # opens the full command list
```
--------------------------------
### CLI: forge mcp show
Source: https://forgecode.dev/docs/mcp-integration
Displays the full configuration for a specific MCP server.
```APIDOC
## forge mcp show
### Description
Shows the full configuration for one server, including command/URL, arguments, environment variables, and resolved config.
### Parameters
#### Arguments
- **server_name** (string) - Required - The name of the server to display.
#### Options
- **--porcelain** (flag) - Optional - Enables machine-readable output.
```
--------------------------------
### Debug Authentication Failure with Code Reference
Source: https://forgecode.dev/docs/vscode-extension
When debugging, provide ForgeCode with the exact code snippet related to the issue, including file paths and line numbers, to get precise environment-specific suggestions.
```plaintext
: Help me debug this auth function @[src/auth/AuthService.ts:45:67] - works locally but fails in production
```
--------------------------------
### Execute Implementation with ForgeCode
Source: https://forgecode.dev/docs/plan-and-act-guide
Prompt for ForgeCode to implement features based on a previously generated plan file.
```text
: Following the $(@rate-limiting-plan.md) we discussed, implement the Redis-based rate limiter for the /api/auth endpoints first in $(@src/auth).
```
--------------------------------
### Import Multiple MCP Servers
Source: https://forgecode.dev/docs/mcp-integration
Add multiple MCP servers, like Context7, Deepwiki, and Playwright, to your local scope. This allows agents to connect to various external tools and services.
```bash
forge mcp import '{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/sse"
},
"deepwiki": {
"url": "https://mcp.deepwiki.com/sse"
},
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}'
```
--------------------------------
### Skill Directory Structure
Source: https://forgecode.dev/docs/skills
Illustrates the directory structure for both project-specific and global skills within ForgeCode.
```bash
.forge/ # project skills
└── skills/
└── release-notes/
└── SKILL.md
~/forge/ # global skills (all projects)
└── skills/
└── release-notes/
└── SKILL.md
```
--------------------------------
### Import MCP Server with Playwright
Source: https://forgecode.dev/docs/mcp-integration
Use this command to import an MCP server, such as Playwright, into your local configuration. Confirm the import by listing servers.
```bash
forge mcp import '{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}'
forge mcp list
```
--------------------------------
### Configure Model and Behavior Settings
Source: https://forgecode.dev/docs/creating-agents
Advanced configuration for model selection, sampling parameters, and reasoning capabilities within the YAML frontmatter.
```yaml
---
id: my-agent
title: My Agent
description: Brief description of what this agent does
# Model selection (optional — defaults to your configured model)
model: claude-sonnet-4
provider: anthropic # Must be snake_case: open_router, openai, requesty, etc.
# Sampling (optional)
temperature: 0.1 # 0.0–2.0 — lower = more precise, higher = more creative
top_p: 0.9 # 0.0–1.0 nucleus sampling threshold
top_k: 40 # 1–1000
max_tokens: 8192 # 1–100,000
# Limits (optional)
max_turns: 50 # Max conversation turns before the agent stops
max_requests_per_turn: 10
max_tool_failure_per_turn: 3 # Max tool failures per turn before forcing completion
# Visibility (optional)
tool_supported: true # Whether this agent can be called as a tool by other agents
# Reasoning (optional — for models that support it)
reasoning:
enabled: true
effort: medium # low | medium | high
max_tokens: 2048 # Must be > 1024 and < max_tokens
exclude: false # Hide reasoning output from the response
---
```
--------------------------------
### Send First Prompt
Source: https://forgecode.dev/docs
Sends a prompt to the configured AI model using the Zsh plugin. Requires the ':' prefix followed by a space and the prompt text.
```bash
: Hi! What is the time?
```
--------------------------------
### AGENTS.md for Basic Standards with Comments
Source: https://forgecode.dev/docs/custom-rules-guide
A foundational set of guidelines including error handling, unit tests, meaningful variable names, and comments for complex logic. Suitable for teams beginning with project guidelines.
```markdown
# Development Guidelines
## Core Standards
- Add error handling to all functions
- Include unit tests for new code
- Use meaningful variable names
- Add comments for complex logic
```
--------------------------------
### Configure user_prompt template
Source: https://forgecode.dev/docs/creating-agents
Use a block scalar to define a template that wraps user input with event metadata and system dates.
```yaml
user_prompt: |-
<{{event.name}}>{{event.value}}{{event.name}}>
{{current_date}}
```
--------------------------------
### Monitor Indexing Progress
Source: https://forgecode.dev/docs/forge-services
Use this command to track the progress of project indexing and view which files are currently being synced. This helps in understanding the status of semantic sync.
```bash
:sync-status
```
--------------------------------
### Tagging Files in Prompts
Source: https://forgecode.dev/docs/zsh-support
Tag files in your prompts using '@' followed by a partial file name, then press TAB for fuzzy file picking. This automatically inserts the full file path into your prompt. '.gitignore' is respected.
```shell
: review the changes in @package
: explain the logic in @src/utils/helper
: optimize the queries in @database/queries
```
```shell
: review the changes in @[src/components/Header.tsx]
```
--------------------------------
### Configure FORGE_BIN for Multiple Versions
Source: https://forgecode.dev/docs/forge-bin
Set the binary path to a specific version, such as a nightly build, to avoid conflicts with stable releases.
```bash
export FORGE_BIN=~/bin/forge-nightly
```
--------------------------------
### List All ZSH Key Bindings
Source: https://forgecode.dev/docs/shortcuts
Use this command to display all currently active key bindings in your ZSH session. This is useful for understanding your current keyboard configuration.
```shell
bindkey
```
--------------------------------
### Set Proxy in Shell Profile (~/.zshrc)
Source: https://forgecode.dev/docs/proxy-configuration
Make proxy settings available system-wide by adding these export commands to your shell profile (e.g., ~/.zshrc or ~/.bashrc). Remember to reload your shell after changes.
```shell
# ~/.zshrc
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1,.internal.company.com
```
--------------------------------
### Command-Based Server Configuration
Source: https://forgecode.dev/docs/mcp-integration
Define a command-based MCP server, specifying the command to execute, its arguments, and any necessary environment variables.
```json
{
"server_name": {
"command": "command_to_execute",
"args": ["arg1", "arg2", "arg3"],
"env": {
"ENV_VAR": "value",
"ANOTHER_VAR": "another_value"
}
}
}
```
--------------------------------
### AGENTS.md for Python/Django Projects
Source: https://forgecode.dev/docs/custom-rules-guide
Guidelines tailored for Python/Django projects, focusing on project-specific development standards.
```markdown
# Python/Django Development Guidelines
```
--------------------------------
### Inline Agent Switching and Prompting
Source: https://forgecode.dev/docs/zsh-support
Switch agents and send a prompt in a single step by prefixing the agent name and prompt after ':'.
```shell
:forge refactor this function to be more maintainable
```
--------------------------------
### Verify ForgeCode Services are Active
Source: https://forgecode.dev/docs/forge-services
Run this command to confirm that ForgeCode Services are active. Look for `sem_search` listed under `SYSTEM` to verify.
```bash
:tools
```
--------------------------------
### Request Planning from Muse
Source: https://forgecode.dev/docs/plan-and-act-guide
Prompt for Muse to generate and critique a technical implementation plan.
```text
: Write a plan for adding rate limiting to our API. Include:
- Which endpoints need protection
- Storage mechanism for rate data
- Error responses and status codes
- Integration points with existing middleware
Now critique this plan. What did you miss?
```
--------------------------------
### Explore ForgeCode Commands
Source: https://forgecode.dev/docs
Displays a list of all available ForgeCode commands that can be run directly from the shell. Triggered by typing ':' and pressing Tab without a space.
```bash
: # then press Tab WITHOUT space
```
--------------------------------
### CLI: forge mcp import
Source: https://forgecode.dev/docs/mcp-integration
Imports one or more MCP servers from a JSON configuration string.
```APIDOC
## forge mcp import
### Description
Import one or more MCP servers from a JSON string into the project or user configuration.
### Parameters
#### Arguments
- **json_configuration** (string) - Required - A JSON string defining the MCP servers.
#### Options
- **-s, --scope** (string) - Optional - The scope to import into: 'local' or 'user' (default: 'local').
- **--porcelain** (flag) - Optional - Enables machine-readable output.
### Request Example
forge mcp import '{"mcpServers": {"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}}}'
```
--------------------------------
### Set Proxy in ~/.env File
Source: https://forgecode.dev/docs/proxy-configuration
Configure proxy settings persistently for ForgeCode by adding these variables to your ~/.env file. This method affects only ForgeCode.
```shell
# ~/.env
HTTP_PROXY=http://proxy.company.com:8080
HTTPS_PROXY=http://proxy.company.com:8080
NO_PROXY=localhost,127.0.0.1,.internal.company.com
```
--------------------------------
### Configure Emacs (GUI) Editor
Source: https://forgecode.dev/docs/editor-configuration
Use 'emacsclient -c' to configure Emacs in GUI mode. This command connects to a running Emacs instance and opens the file.
```shell
emacsclient -c
```
--------------------------------
### Configure Nano Editor
Source: https://forgecode.dev/docs/editor-configuration
Set the EDITOR environment variable to use nano. Nano, like Vim and Neovim, blocks the terminal until the file is closed.
```shell
export EDITOR="nano"
```
--------------------------------
### Switching Between Existing Conversations
Source: https://forgecode.dev/docs/zsh-support
Use ':conversation' to open a list of saved conversations and switch to a different one. Use ':conversation -' to quickly jump back to the last conversation.
```shell
:conversation
```
```shell
:conversation -
```
--------------------------------
### Define Project Structure in Markdown
Source: https://forgecode.dev/docs/custom-rules
A visual representation of a project directory structure using a code block within the AGENTS.md file.
```text
├── src/
│ ├── components/ # Reusable React components
│ ├── pages/ # Next.js pages
│ ├── services/ # API calls and business logic
│ ├── utils/ # Helper functions
│ └── styles/ # Global styles and themes
├── public/ # Static assets
└── tests/ # Test files
```
--------------------------------
### Triggering File Tagging with TAB Completion
Source: https://forgecode.dev/docs/file-tagging
Use the @ symbol followed by a partial path and press TAB to trigger the fuzzy picker for file selection.
```text
: explain the logic in @src/utils/helper
: review @package
```
--------------------------------
### Define File-Specific Development Guidelines
Source: https://forgecode.dev/docs/custom-rules-guide
Standards categorized by file type, including TypeScript, Python, and SQL conventions.
```markdown
# Development Guidelines
## File-Specific Standards
### TypeScript Files (.ts/.tsx)
- Use explicit type annotations
- Add JSDoc comments for public APIs
### Python Files (.py)
- Use type hints following PEP 484
- Format with black and sort imports with isort
### SQL Files (.sql)
- Use uppercase for SQL keywords
- Add comments explaining complex queries
```
--------------------------------
### List Available Skills
Source: https://forgecode.dev/docs/skills
Command to view all available skills recognized by ForgeCode.
```bash
:skill
```
--------------------------------
### List All ZSH Editor Actions
Source: https://forgecode.dev/docs/shortcuts
This command lists all available editor actions (widgets) that can be bound to keys in ZSH. It helps in customizing key bindings for specific actions.
```shell
zle -al
```
--------------------------------
### Use :edit Command
Source: https://forgecode.dev/docs/editor-configuration
Invoke the :edit command to open your configured editor for prompt composition.
```shell
:edit
```
--------------------------------
### Configure Authenticated Proxies
Source: https://forgecode.dev/docs/proxy-configuration
Embed username and password directly in the proxy URL for authenticated proxies. Be aware of security risks associated with storing credentials this way.
```shell
HTTP_PROXY=http://username:password@proxy.company.com:8080
HTTPS_PROXY=http://username:password@proxy.company.com:8080
```
--------------------------------
### Configure Development Tool Integration MCP Server
Source: https://forgecode.dev/docs/mcp-integration
Use this configuration for database operations, schema work, and migration tooling.
```json
{
"mcpServers": {
"database_tools": {
"command": "node",
"args": ["database-mcp-server.js"],
"env": {
"DB_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/db",
"QUERY_TIMEOUT": "30000"
}
}
}
}
```
--------------------------------
### Configure FORGE_BIN for Non-standard Paths
Source: https://forgecode.dev/docs/forge-bin
Set the binary path when the executable is located outside of the system PATH.
```bash
export FORGE_BIN=/opt/forgecode/bin/forge
```
--------------------------------
### Configure Zed Editor
Source: https://forgecode.dev/docs/editor-configuration
Use 'zed --wait' to configure Zed as your editor. The --wait flag is essential for ForgeCode to recognize when editing is finished.
```shell
zed --wait
```
--------------------------------
### Switch to Muse Agent
Source: https://forgecode.dev/docs/plan-and-act-guide
Command to activate the Muse agent for planning and analysis within a ZSH shell.
```shell
:muse
```
--------------------------------
### Agent File Structure
Source: https://forgecode.dev/docs/creating-agents
The basic anatomy of an agent file, separating YAML metadata from the system prompt.
```markdown
---
# YAML frontmatter — capabilities and metadata
id: my-agent
title: My Agent
---
System prompt — the agent's instructions, written in plain markdown.
```
--------------------------------
### AGENTS.md for Frontend and Backend Development
Source: https://forgecode.dev/docs/custom-rules-guide
Organize development rules by domain, specifying standards for frontend (React components, accessibility, PropTypes) and backend (dependency injection, logging, input validation).
```markdown
# Development Guidelines
## Frontend Development
- Use React functional components
- Add accessibility attributes
- Include PropTypes for components
## Backend Development
- Use dependency injection
- Add request logging to endpoints
- Validate all input with schemas
```
--------------------------------
### Configure IntelliJ IDEA Editor
Source: https://forgecode.dev/docs/editor-configuration
Set the command to 'idea --wait' to use IntelliJ IDEA as your editor. This flag makes the command wait until the editing session is complete.
```shell
idea --wait
```
--------------------------------
### Tagging a Directory
Source: https://forgecode.dev/docs/file-tagging
Tag an entire directory to provide context for tasks spanning multiple related files.
```text
@[src/components]
```
--------------------------------
### Define custom agent override
Source: https://forgecode.dev/docs/creating-agents
Create a markdown file with YAML frontmatter to replace a built-in agent definition.
```markdown
---
id: "forge"
title: "Frontend Forge"
description: "Forge agent tuned for React and TypeScript"
tools:
- read
- write
- patch
- shell
temperature: 0.1
---
You are a frontend development expert for this React TypeScript project.
Build modern, accessible components. Explain architectural decisions. Include TypeScript types in every example you write.
```
--------------------------------
### Basic ForgeCode Prompts
Source: https://forgecode.dev/docs/zsh-support
Send basic AI prompts to ForgeCode using the ':' sentinel. Prompts are sent to the last-used agent, defaulting to ForgeCode if it's the first interaction.
```shell
: explain this error message
: refactor this function to be more readable
: add error handling to the database connection
```
--------------------------------
### AGENTS.md for React/TypeScript Teams
Source: https://forgecode.dev/docs/custom-rules-guide
Guidelines for React/TypeScript projects, emphasizing strict mode, functional components, testing attributes, React Testing Library, and JSDoc comments for props.
```markdown
# React/TypeScript Development Guidelines
## Core Standards
- Use TypeScript strict mode
- Prefer functional components with hooks
- Add data-testid attributes for testing
- Use React Testing Library for tests
- Include JSDoc comments for props
```
--------------------------------
### Configure Browser Automation MCP Server
Source: https://forgecode.dev/docs/mcp-integration
Use this configuration for UI testing, data extraction, and scripted page interactions.
```json
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["@modelcontextprotocol/server-browser"],
"env": {
"HEADLESS": "false",
"VIEWPORT_WIDTH": "1920",
"VIEWPORT_HEIGHT": "1080"
}
}
}
}
```
--------------------------------
### Export Session Diagnostics
Source: https://forgecode.dev/docs/ignoring-files
Command to generate a diagnostic dump for troubleshooting persistent file visibility issues.
```text
:dump html
```
--------------------------------
### Import MCP Server to User Scope
Source: https://forgecode.dev/docs/mcp-integration
Import an MCP server, such as Playwright, specifically to your user scope. This makes the server available globally across your projects.
```bash
forge mcp import --scope user '{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}'
```
--------------------------------
### Configure Sublime Text Editor
Source: https://forgecode.dev/docs/editor-configuration
Use the 'subl --wait' command to configure Sublime Text as your editor. The --wait flag ensures the command blocks until the file is closed.
```shell
subl --wait
```
--------------------------------
### Implement Feature Across Multiple Files
Source: https://forgecode.dev/docs/vscode-extension
When implementing features that span multiple files, provide references to all relevant code sections to ensure consistent application of changes, such as adding dark mode support.
```plaintext
: Add dark mode support to @[src/components/ThemeProvider.tsx:15:45] and update @[src/styles/theme.css:23:67]
```
--------------------------------
### Switch to ForgeCode Agent
Source: https://forgecode.dev/docs/plan-and-act-guide
Command to activate the ForgeCode agent for code implementation.
```shell
:forge
```
--------------------------------
### Edit ForgeCode Configuration
Source: https://forgecode.dev/docs/forgecode-config
Command to open the global configuration file in the default system editor.
```text
:config-edit
```
--------------------------------
### Accept Invalid Certificates (Use with Caution)
Source: https://forgecode.dev/docs/proxy-configuration
Disable all certificate validation by setting FORGE_HTTP_ACCEPT_INVALID_CERTS to true. This is insecure and should only be used in controlled development environments.
```shell
FORGE_HTTP__ACCEPT_INVALID_CERTS=true
```
--------------------------------
### Reference Multiple Files in ForgeCode Prompt
Source: https://forgecode.dev/docs/vscode-extension
Combine references to different files and line ranges within a single ForgeCode prompt to provide comprehensive context for complex queries.
```plaintext
: Compare these approaches @[src/utils/oldMethod.js:15:45] @[src/utils/newMethod.js:20:50]
: Review this component and its styles @[components/Button.tsx] @[styles/button.css:12:34]
```
--------------------------------
### Tagging a Single File
Source: https://forgecode.dev/docs/file-tagging
Tag a specific file to provide direct code context to the agent.
```text
@[src/auth/AuthService.ts]
```
--------------------------------
### Disable ForgeCode Services
Source: https://forgecode.dev/docs/forge-services
This command signs you out and disables ForgeCode Services. To re-enable, run `:login`, select **ForgeServices**, and then run `:sync` for the desired project.
```bash
:logout
```
--------------------------------
### Select AI Model
Source: https://forgecode.dev/docs
Allows the user to select an AI model from a list, with filtering capabilities. The chosen model is remembered across sessions.
```bash
:model
```
--------------------------------
### Configure Vim Editor
Source: https://forgecode.dev/docs/editor-configuration
Set the EDITOR environment variable to use Vim. No additional flags are needed as Vim blocks until closed.
```shell
export EDITOR="vim"
```
--------------------------------
### ZSH Aliases and ForgeCode Prompts
Source: https://forgecode.dev/docs/zsh-support
Use your existing ZSH aliases and send AI prompts to ForgeCode using the ':' sentinel character. This allows seamless integration of AI assistance into your regular shell workflow.
```shell
# Your aliases work as usual (gst = git status, gcam = git commit -am)
gst
gcam "fix: resolve memory leak"
# Ask ForgeCode without leaving your shell
: analyze the memory usage patterns in src/server.rs
# Run your tools as part of the investigation
ps aux | grep server
htop -p $(pgrep server)
# Continue with full context
: now optimize the memory allocations you identified in the server struct
```
--------------------------------
### URL-Based Server Configuration
Source: https://forgecode.dev/docs/mcp-integration
Configure a URL-based MCP server by providing the endpoint URL. This is used for connecting to services that expose an API via HTTP.
```json
{
"server_name": {
"url": "http://localhost:3000/events"
}
}
```
--------------------------------
### Debug Ignore Patterns
Source: https://forgecode.dev/docs/ignoring-files
Commands to verify if specific files match ignore patterns or to list files matching a pattern for debugging purposes.
```bash
# Check if a specific file matches
git check-ignore -v path/to/file
# Find all files matching a pattern
find . -name "*.log"
# Check which of those are ignored
git check-ignore -v $(find . -name "*.log")
```
--------------------------------
### Reload MCP Servers
Source: https://forgecode.dev/docs/mcp-integration
Execute this command after making manual changes to your .mcp.json file to ensure the MCP servers are reloaded with the updated configuration.
```bash
forge mcp reload
```
--------------------------------
### Define Node.js/Express API Standards
Source: https://forgecode.dev/docs/custom-rules-guide
Guidelines for Node.js and Express APIs, focusing on async/await, validation, and testing.
```markdown
# Node.js/Express API Guidelines
## Core Standards
- Use async/await instead of callbacks
- Add input validation with Joi schemas
- Include request/response logging
- Use dependency injection for services
- Write integration tests for all endpoints
```
--------------------------------
### Configure Neovim Editor
Source: https://forgecode.dev/docs/editor-configuration
Set the EDITOR environment variable to use Neovim. Similar to Vim, Neovim blocks until closed, so no extra flags are required.
```shell
export EDITOR="nvim"
```
--------------------------------
### Using :edit for Long Prompts
Source: https://forgecode.dev/docs/zsh-support
For longer prompts, use ':edit' to open your configured editor (e.g., VS Code). Write your prompt in the editor, save, and close to send it to ForgeCode.
```shell
:edit
```
```shell
export FORGE_EDITOR="code --wait"
# or: export EDITOR="code --wait"
```
--------------------------------
### Override Ignore Patterns
Source: https://forgecode.dev/docs/ignoring-files
Use the exclamation mark prefix in an .ignore file to whitelist specific files or hidden files that would otherwise be excluded.
```text
!path/to/file
```
```text
!.important-config
```
--------------------------------
### List ZSH Bindings for Emacs Keymap
Source: https://forgecode.dev/docs/shortcuts
View all key bindings specifically for the Emacs keymap, which is the default in ZSH. This helps in understanding or customizing Emacs-style shortcuts.
```shell
bindkey -M emacs
```
--------------------------------
### Run Zsh Plugin Diagnostics
Source: https://forgecode.dev/docs
Executes the ForgeCode Zsh plugin diagnostics command to check for and report any configuration issues.
```bash
forge zsh doctor
```
--------------------------------
### Configure External API Integration MCP Server
Source: https://forgecode.dev/docs/mcp-integration
Use this configuration for real-time data access and API-backed workflows.
```json
{
"mcpServers": {
"weather_api": {
"command": "python",
"args": ["-m", "weather_mcp_server"],
"env": {
"WEATHER_API_KEY": "your_api_key",
"DEFAULT_LOCATION": "San Francisco"
}
}
}
}
```