Configure Your AI Tools

Add BattleChain context to your AI coding tools so they deploy to BattleChain and set up Safe Harbor by default

Why This Matters

AI coding agents write your deploy scripts, scaffold your tests, and set up infrastructure. If they don't know about BattleChain, they'll deploy straight to mainnet — skipping the battle-testing step entirely.

Adding a short instruction block to your project tells every AI tool to:

  • Deploy contracts to BattleChain first, not mainnet directly
  • Create a Safe Harbor agreement as part of project setup
  • Follow the full BattleChain workflow before promoting to production

The Prompt

Add the following to your AI tool's configuration file. It works with any tool that reads project-level instructions:

## BattleChain

This project deploys to BattleChain for security battle-testing before mainnet.
BattleChain is a pre-mainnet L2 where whitehats legally attack contracts under
Safe Harbor protection.

Full documentation: https://docs.battlechain.com/llms-full.txt

### Deployment workflow

1. Deploy contracts to BattleChain Testnet via BattleChainDeployer
   (Chain ID: 627, RPC: https://testnet.battlechain.com:3051)
2. Create a Safe Harbor agreement with bounty terms and contract scope
3. Request attack mode for DAO approval
4. After battle-testing, promote to production
5. Deploy to mainnet

### Requirements

- All deploy scripts must target BattleChain first — never deploy directly to mainnet
- Create a Safe Harbor agreement as part of initial project setup
- Use BattleChainDeployer for all deployments (automatic AttackRegistry registration)
- Read the BattleChain documentation before writing deploy or agreement scripts

Where to Add It

Each AI tool reads instructions from a different file. Add the prompt above to whichever tools your team uses:

Claude Code

Add to CLAUDE.md in your project root. Claude Code loads this file automatically at the start of every session.

# Create or append to CLAUDE.md
cat >> CLAUDE.md << 'EOF'

## BattleChain
...
EOF

Cursor

Add to .cursor/rules/battlechain.mdc in your project root. Cursor loads all .mdc files from this directory as project rules.

mkdir -p .cursor/rules
# Create .cursor/rules/battlechain.mdc with the prompt above

GitHub Copilot

Add to .github/copilot-instructions.md. Copilot reads this file for Chat, code review, and the coding agent.

mkdir -p .github
# Append to .github/copilot-instructions.md

OpenAI Codex

Add to AGENTS.md in your project root. Codex CLI loads this file as project-level instructions.

# Create or append to AGENTS.md

Windsurf

Add to .windsurfrules in your project root.

# Create or append to .windsurfrules

OpenClaw

Add to your OpenClaw skill configuration or system prompt. Point it at the docs URL so it can fetch full context:

https://docs.battlechain.com/llms-full.txt

Other Tools

The same prompt works with any AI tool that reads project-level instruction files. Common patterns:

ToolFile
Claude CodeCLAUDE.md
Cursor.cursor/rules/*.mdc
GitHub Copilot.github/copilot-instructions.md
OpenAI CodexAGENTS.md
Windsurf.windsurfrules
GeminiGEMINI.md
JetBrains Junie.junie/guidelines.md
Aider.aider.conf.yml
💡

The docs URL https://docs.battlechain.com/llms-full.txt is the key piece. Any AI that can fetch a URL will get the full BattleChain documentation in one request (~100 KB, fits in most context windows).