Skip to content

Instantly share code, notes, and snippets.

@pluto-atom-4
Last active January 23, 2026 07:03
Show Gist options
  • Select an option

  • Save pluto-atom-4/0e28a50043115dc59a8075bdc878917e to your computer and use it in GitHub Desktop.

Select an option

Save pluto-atom-4/0e28a50043115dc59a8075bdc878917e to your computer and use it in GitHub Desktop.
To configure my repository's .github and .claude directories

1. Configure Project-Level Settings (.claude)

The .claude folder stores project-specific context and "skills" that guide AI agents in their reviews.

  • Create Project Memory: Place a CLAUDE.md file at your project root to act as a coordinator.
  • Define Skills: Create the directory .claude/skills/. For each review area, create a subdirectory containing a SKILL.md file:
    • Backend Review: .claude/skills/backend-review/SKILL.md
      • Instruction: Focus on PEP 8 standards, FastAPI/Flask patterns, and Pydantic validation in /backend.
    • Frontend Review: .claude/skills/frontend-review/SKILL.md
      • Instruction: Focus on Next.js 15+ App Router patterns, TypeScript safety, and Tailwind CSS efficiency in /frontend.
    • Infrastructure Review: .claude/skills/terraform-review/SKILL.md
      • Instruction: Focus on HCL best practices, security groups, and state management in /terraform.

2. Configure GitHub Automation (.github)

The .github folder integrates these instructions into your development workflow and GitHub Copilot environment

  • Custom Agents: Create specialized personas in .github/agents/ to handle reviews automatically.
    • Code Reviewer Agent: Create Code Reviewer.agent.md. In the YAML frontmatter, specify tools like githubRepo and search.
  • Workflow Integration: Set up GitHub Actions in .github/workflows/review.yml to trigger reviews on pull requests (PRs).
    • Python: Include steps for autopep8 or wemake-python-styleguide.
    • Terraform: Use tflint to scan scripts under [project root]/terraform.
    • Agent Trigger: Use the Claude Code GitHub Action to automatically invoke your custom review skills when a PR is opened.

3. Step-by-Step Setup Summary

  1. Initialize Folders: Run mkdir -p .github/{agents,workflows} .claude/skills/{backend-review,frontend-review,terraform-review}.
  2. Author Instructions: Use imperative language (e.g., "Analyze code for...") in your SKILL.md and .agent.md files to ensure clarity.
  3. Define Scopes: Explicitly reference the directories /backend, /frontend, and /terraform in your skill descriptions so the agent knows exactly where to look.
  4. Connect GitHub: Run /install-github-app within the Claude Code terminal to link your repository and enable automated PR comments.
  5. Test: Open a test PR and ask Claude, "Review the changes in my backend," to verify it loads the backend-review skill automatically based on your description

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment