agentleFS
MicrosoftKnown publishermicrosoft/cmd-call-graph/.github/copilot-instructions.md

cmd-call-graph

Copilot instructions60 starsChanged 3 months agoMITView on GitHub

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow existing code patterns and style in the repository

    line 14
  2. Distinctive:

    Ensure all code works on Windows platforms

    line 16
  3. Distinctive:

    Use standard graph notation and formats where applicable

    line 26
  4. Distinctive:

    Ensure graph visualization is clear and readable

    line 28
  5. Distinctive:

    Test with various complexity levels of batch files

    line 36
  6. Distinctive:

    Verify cross-file call detection works correctly

    line 38
  7. Distinctive:

    Test on different Windows versions when applicable

    line 39
  8. Distinctive:

    Document any limitations or known issues

    line 43
  9. Distinctive:

    Consider memory usage when processing multiple files

    line 53
  10. Distinctive:

    Use consistent naming for graph nodes (e.g., script names, labels)

    line 57
  11. Distinctive:

    Follow Windows path conventions and handle both forward and backslashes

    line 59
  12. Distinctive:

    Prefer clarity over brevity for batch file parsing logic

    line 67
  13. Distinctive:

    Consider cross-platform compatibility where feasible

    line 69
  14. Distinctive:

    Add appropriate logging for debugging call graph generation

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

GitHub Copilot Instructions for cmd-call-graph

Repository Overview

This repository contains tools and utilities for analyzing and visualizing call graphs in Windows batch files (.cmd, .bat) and command scripts.

Project Context

  • Purpose: Generate and analyze call graphs for Windows command/batch scripts
  • Primary Languages: The codebase likely includes parsers and analyzers for CMD/BAT files
  • Target Platform: Windows command line environments

Coding Standards and Conventions

General Guidelines

  • Follow existing code patterns and style in the repository
  • Maintain backward compatibility with existing command line interfaces
  • Ensure all code works on Windows platforms
  • Include appropriate error handling for file I/O operations

Command/Batch File Parsing

  • Handle both .cmd and .bat file extensions
  • Support common batch file constructs (CALL, GOTO, labels, etc.)
  • Account for case-insensitive command names in Windows
  • Handle environment variable expansion appropriately

Graph Generation

  • Use standard graph notation and formats where applicable
  • Support multiple output formats if possible (DOT, JSON, etc.)
  • Ensure graph visualization is clear and readable

Key Components

  • Parser: Handles parsing of CMD/BAT files
  • Analyzer: Builds call relationships and dependencies
  • Visualizer: Generates graph outputs

Testing Guidelines

  • Test with various complexity levels of batch files
  • Include edge cases like recursive calls, conditional calls
  • Verify cross-file call detection works correctly
  • Test on different Windows versions when applicable

Documentation

  • Include examples of usage in code comments
  • Document any limitations or known issues
  • Provide clear error messages for user-facing components

Security Considerations

  • Sanitize file paths to prevent directory traversal
  • Be cautious with executing or evaluating batch file content
  • Validate input files before processing

Performance Considerations

  • Optimize for large batch file repositories
  • Consider memory usage when processing multiple files
  • Implement caching where appropriate for repeated analyses

Common Patterns to Follow

  • Use consistent naming for graph nodes (e.g., script names, labels)
  • Maintain a clear separation between parsing and visualization logic
  • Follow Windows path conventions and handle both forward and backslashes

Dependencies and Libraries

  • List any specific libraries used for graph generation
  • Note any Windows-specific dependencies
  • Specify minimum supported Windows/PowerShell versions if applicable

When Generating Code

  • Prefer clarity over brevity for batch file parsing logic
  • Include helpful comments explaining Windows-specific behaviors
  • Consider cross-platform compatibility where feasible
  • Add appropriate logging for debugging call graph generation

Areas Needing Special Attention

  • Complex batch file constructs (nested calls, dynamic label generation)
  • Cross-file dependencies and external script calls
  • Performance optimization for large codebases
  • Edge cases in Windows command parsing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.