Last active
August 26, 2025 14:18
-
-
Save bgoewert/d7aad89f3dc3a01b0b257423bc19e054 to your computer and use it in GitHub Desktop.
Claude Code using AGENTS.md. Copy this to your user settings under ~/.claude/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if AGENTS.md exists in the project directory | |
| if [ -f "$CLAUDE_PROJECT_DIR/AGENTS.md" ]; then | |
| cd "$CLAUDE_PROJECT_DIR" | |
| if [ ! -L "CLAUDE.md" ] || [ "$(readlink CLAUDE.md)" != "AGENTS.md" ]; then | |
| # Remove existing CLAUDE.md if it's not the right symlink | |
| [ -e "CLAUDE.md" ] && rm "CLAUDE.md" | |
| # Create the symlink in the project directory | |
| ln -s AGENTS.md CLAUDE.md | |
| echo "Created symlink in $PROJECT_DIR: CLAUDE.md -> AGENTS.md" | |
| fi | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://json.schemastore.org/claude-code-settings.json", | |
| "hooks": { | |
| "SessionStart": [ | |
| { | |
| "matcher": "startup", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "~/.claude/hooks/agentsmd_symlink.sh" | |
| } | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment