Strict Formatter Agent with Hooks — CoPilot Agents
    Neura MarketNeura Market/CoPilot
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityCoPilotCoPilot
    DeepSeekDeepSeekStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityPluginsTrendingGenerate
    CoPilotAgentsStrict Formatter Agent with Hooks
    Back to Agents

    Strict Formatter Agent with Hooks

    VS Code Docs April 23, 2026
    0 copies 0 downloads

    An agent that auto-formats code after every edit using configurable hooks. Demonstrates the PostToolUse hook pattern for running scripts automatically when Copilot makes changes.

    Agent Definition
    Agent file: .github/agents/strict-formatter.agent.md
    
    ---
    name: Strict Formatter
    description: Agent that auto-formats code after every edit
    hooks:
      PostToolUse:
        - type: command
          command: "./scripts/format-changed-files.sh"
    ---
    
    You are a code editing agent. After making changes, files are automatically formatted by the PostToolUse hook.
    
    This agent demonstrates the hooks pattern in GitHub Copilot custom agents. Hooks allow automatic actions to run at specific points during agent sessions:
    
    - PostToolUse: Runs after any tool is used (e.g., after an edit is made)
    - PreToolUse: Runs before a tool is used
    - PostChat: Runs after a chat response
    
    The format script should:
    1. Detect which files were changed
    2. Run the project's formatter (Prettier, Black, gofmt, etc.)
    3. Report any formatting changes made
    
    This pattern ensures consistent code style regardless of the model's output formatting, and can be adapted for other post-edit operations like linting, type checking, or running tests.

    Tags

    formattinghooksautomationcode-style

    Comments

    More Agents

    View all
    i18n

    Localization Agent

    Implements internationalization (i18n) systematically across the application. Handles string extraction, translation file management, RTL support, date/number formatting, and pluralization rules.

    A
    Awesome Copilot
    planning

    Implementation Planner Agent

    Creates detailed implementation plans in markdown format using only read and search tools. Specializes in technical specifications, architecture documentation, and step-by-step implementation guides.

    G
    GitHub Docs
    debugging

    Debugger Agent

    Root-cause analysis specialist that systematically diagnoses bugs using stack trace analysis, data flow tracing, hypothesis testing, and minimal reproduction strategies.

    A
    Awesome Copilot
    performance

    Performance Investigator Agent

    Diagnoses frontend performance issues including Core Web Vitals (LCP, CLS, INP), bundle size analysis, render performance, and runtime profiling. Provides actionable optimization recommendations.

    A
    Awesome Copilot
    meta-agent

    Custom Agent Foundry

    A meta-agent that helps you design and create new custom agents for VS Code. Generates .agent.md files with proper frontmatter, tool configuration, and detailed instructions based on your requirements.

    A
    Awesome Copilot
    database

    Database Expert Agent

    Assists with database design, query optimization, migration management, and data modeling. Covers PostgreSQL, MySQL, MongoDB, and Redis with focus on performance and data integrity.

    A
    Awesome Copilot

    Stay up to date

    Get the latest CoPilot prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for CoPilot and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.