agentleFS
heizaheizaheizaheiza/Charles-mcp/AGENTS.md

Charles-mcp

AGENTS.md317 starsChanged 5 months agoMITView on GitHub

This file defines global agent behavior rules for charles-mcp. For task-specific call sequences, see docs/agent-workflows.md. For canonical public tool contracts, see docs/contracts/tools.md. Do not treat this server as a raw packet dump interface. 1. Never mix source identities: - live plane: capture_id - history plane: recording_path - reverse imported-analysis plane: reverse capture_id - reverse live-analysis plane: live_session_id 2. Preserve and reuse returned identifiers between calls. 3. Do not infer cross-plane identity fallback in agent logic. 4. Default plane = live.…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not treat this server as a raw packet dump interface.

    line 16
  2. Distinctive:

    Never mix source identities:

    line 22
  3. Distinctive:

    Do not infer cross-plane identity fallback in agent logic.

    line 28
  4. Very specific:

    Default plane = live: When the user asks about ongoing / just-now / 现在 / 正在发生的 traffic without explicitly naming a saved recording, start …

    line 29
  5. Very specific:

    When unsure which plane to use, call charles_status first and follow its recommended_next_action.

    line 34
  6. Distinctive:

    Prefer group/summary tools before detail tools:

    line 47
  7. Distinctive:

    Use detail tools only for one confirmed target:

    line 53
  8. Distinctive:

    Do not default to full body expansion:

    line 56
  9. Very specific:

    keep include_full_body=false unless explicitly needed

    line 57
  10. Distinctive:

    prefer task-oriented tools when goal is known:

    line 75
  11. Very specific:

    read summary and report first

    line 80
  12. Very specific:

    only status="stopped" means fully closed

    line 88
  13. Distinctive:

    Prefer status checks over blind retries.

    line 90
  14. Distinctive:

    Keep token usage low:

    line 91
  15. Distinctive:

    avoid bulk detail expansion

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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
AGENTS.md

AGENTS.md

This file defines global agent behavior rules for charles-mcp. For task-specific call sequences, see docs/agent-workflows.md. For canonical public tool contracts, see docs/contracts/tools.md.


1. Global operating model

  • summary first, detail on demand
  • live and history are separate source planes
  • reverse analysis extends traffic inspection into replay / decode / signature workflows
  • state identities must be preserved: capture_id, cursor, recording_path, live_session_id

Do not treat this server as a raw packet dump interface.


2. Identity and plane rules

  1. Never mix source identities:
    • live plane: capture_id
    • history plane: recording_path
    • reverse imported-analysis plane: reverse capture_id
    • reverse live-analysis plane: live_session_id
  2. Preserve and reuse returned identifiers between calls.
  3. Do not infer cross-plane identity fallback in agent logic.
  4. Default plane = live. When the user asks about ongoing / just-now / 现在 / 正在发生的 traffic without explicitly naming a saved recording, start with start_live_capture and stay on the live plane. Only switch to list_recordings / query_recorded_traffic / analyze_recorded_traffic when the user explicitly references a .chlsj file or 历史录包.
  5. When unsure which plane to use, call charles_status first and follow its recommended_next_action.
  6. Never clear the user's Charles session unless the user explicitly asks. start_live_capture defaults to adopting the user's ongoing session and preserves the traffic already captured there. Only pass reset_session=true when the user explicitly asks to clear / wipe / 清空 the session before starting a fresh capture. A wrongly-passed reset_session=true destroys the user's in-progress data and is not recoverable from this server.

3. Selection and expansion rules

  1. Prefer group/summary tools before detail tools:
    • group_capture_analysis
    • query_live_capture_entries
    • analyze_recorded_traffic
    • reverse_query_entries
    • task-oriented reverse live workflow tools
  2. Use detail tools only for one confirmed target:
    • get_traffic_entry_detail
    • reverse_get_entry_detail
  3. Do not default to full body expansion:
    • keep include_full_body=false unless explicitly needed

4. Read vs peek semantics

  • read_* tools consume or advance the current increment/cursor.
  • peek_* tools preview without consuming or advancing.
  • Choose intentionally; do not replace one with the other casually.

5. Reverse workflow usage principles

  1. For reverse imported analysis:
    • narrow with reverse_query_entries before detail/decode/replay.
  2. For reverse live analysis:
    • preserve live_session_id
    • prefer task-oriented tools when goal is known:
      • reverse_analyze_live_login_flow
      • reverse_analyze_live_api_flow
      • reverse_analyze_live_signature_flow
  3. For task-oriented outputs:
    • read summary and report first
    • expand evidence only when needed

6. Recovery and token-budget principles

  1. stop_live_capture:
    • only status="stopped" means fully closed
    • stop_failed with recoverable=true and active_capture_preserved=true means session still exists
  2. Prefer status checks over blind retries.
  3. Keep token usage low:
    • group first
    • keep max_items small
    • avoid bulk detail expansion

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.