Skip to content

Optimize plugin token usage (v1.2.0)#11

Open
quintonwall wants to merge 4 commits into
mainfrom
token-optimization
Open

Optimize plugin token usage (v1.2.0)#11
quintonwall wants to merge 4 commits into
mainfrom
token-optimization

Conversation

@quintonwall

Copy link
Copy Markdown
Contributor

Summary

Reduces the context-window tokens the plugin consumes in users' Claude Code sessions. Full analysis and savings estimates are in token-optimization-findings.md (added in this PR).

  • Progressive disclosure for the two largest skillspostman-context (19KB → 7.7KB) and generate-spec (10.6KB → 7.2KB) now keep the workflow in SKILL.md and defer detailed rules to references/*.md files read only at the step that needs them. No content deleted, just deferred (~2,800 / ~840 tokens saved per trigger in common cases).
  • Removed the manual routing skill — Claude routes natively from component descriptions; the routing table fired on "user mentions APIs" and cost ~835 tokens in nearly every API-codebase session.
  • Trimmed always-on front-matter descriptions to one or two sentences (~155 tokens saved in every session, every user).
  • Scoped allowed-tools from the mcp__postman__* wildcard to explicit tool lists on all MCP commands and the readiness-analyzer agent. The audit also fixed missing Write/Edit permissions in docs, security, and the agent.
  • Async polling guidancesync, mock, and docs now poll 202 operations with increasing backoff and report only the final result.
  • MCP mode escape hatch — the .mcp.json URL now supports a POSTMAN_MCP_MODE env var (mcp full/default, minimal, code). Full mode stays the default: we verified from the server source that minimal mode lacks the *Context tools, async polling tools, createCollectionFolder, and publishDocumentation, which would break core workflows.
  • Docs refresh — OAuth-first Quick Start, removed out-of-date GIFs, updated CLAUDE.md conventions. Version bumped to 1.2.0.

Test plan

  • claude --plugin-dir . loads the plugin with no manifest errors
  • /postman:setup works (OAuth and API key paths)
  • Natural-language routing still reaches the right commands without the routing skill (e.g. "sync my collection", "is my API agent-ready?")
  • postman-context flow reads references/code-generation.md before generating client code
  • A scoped command (e.g. /postman:sync) completes a full workflow with its explicit allowed-tools list
  • POSTMAN_MCP_MODE=code connects to the code-mode server

Generated with Claude Code

quintonwall and others added 2 commits June 9, 2026 16:50
- Split postman-context (19KB→7.7KB) and generate-spec (10.6KB→7.2KB)
  skills into lean SKILL.md + on-demand references/ files
- Trim always-on front-matter descriptions to one or two sentences
- Scope allowed-tools from mcp__postman__* wildcard to explicit tool
  lists on all MCP commands and the readiness-analyzer agent (also
  fixes missing Write/Edit permissions in docs, security, and agent)
- Add backoff guidance for async 202 polling in sync, mock, docs
- Make MCP server mode switchable via POSTMAN_MCP_MODE (default: full)
- Update README (OAuth-first quick start, native routing, no GIFs)
  and CLAUDE.md conventions; add token-optimization-findings.md

Co-Authored-By: Claude <noreply@anthropic.com>
quintonwall and others added 2 commits June 10, 2026 11:19
validate-frontmatter.py now accepts specific mcp__postman__<toolName>
entries in allowed-tools (and the Edit tool) instead of only the
mcp__postman__* wildcard. validate-structure.py allows
token-optimization-findings.md in the repo root.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant