Skip to content

docs(skills): teach the AEO coach skills about get_prompt_usage - #1055

Merged
gkhngyk merged 7 commits into
ansvisor:mainfrom
cihan-gyk:docs/skills-prompt-usage
Oct 16, 2026
Merged

gkhngyk merged 7 commits into
ansvisor:mainfrom
cihan-gyk:docs/skills-prompt-usage

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Stacked on #1033 (the skills refresh), so this PR also shows its commit until #1033 merges. This part is the last commit, a6e2dca. It documents a tool that #1053 adds, so it should merge after #1053.

Summary

#1053 adds the get_prompt_usage MCP tool and its REST mirror GET /api/mcp/prompt-usage. Both return the numbers behind the new Tracked Prompts usage cards (PROMPT-012). This PR teaches both AEO coach skills about them, so the Agent Chat and other MCP clients use them when the question is about the prompt limit.

ansvisor-aeo-coach (MCP):

  • Prompts & topics: get_prompt_usage is now listed, with what it returns:
    • the brand's active, paused and total prompts;
    • the account's activePrompts, brands and locationsUsed;
    • the plan's locationLimit (null = unlimited) and cta.
  • The unit: the limit counts prompt locations across every brand of the account. An active prompt uses one slot per location it targets; a paused one uses none, and resuming one needs free slots like adding one (feat(prompts): count only active prompt locations toward the plan limit #1034).
  • Slots left: locationLimit − locationsUsed, never below 0.
  • Prompt coverage audit, new step 6: before suggesting new prompts, check the slots left.
    • A null limit means unlimited (self-hosted, or an Enterprise account whose limit isn't set yet): skip the check.
    • Otherwise, if no slots are left, say so: pausing low-value prompts frees slots, and plan.cta names the next step (upgrade_growth, upgrade or contact).

ansvisor-aeo-coach-standalone (REST): the same, as a row for GET /prompt-usage in the endpoint table, plus the same audit step.

Review

I ran a code review before opening this. It found 3 things, all fixed:

  • the audit step didn't cover a null (unlimited) limit, in both skills;
  • the tool description didn't say that resuming a paused prompt needs free slots.

Related issue

None. Follows #1053 (PROMPT-012 part 1), and keeps the skills in step with the MCP tools as #1033 does.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. With feat(prompts): keep per-brand usage counters for the tracked prompts cards #1053 applied and the MCP server connected, load the ansvisor-aeo-coach skill and ask "how many prompts can we still add?". The agent calls get_prompt_usage and answers with the slots left, or says the plan is unlimited.
  2. Ask for a prompt coverage audit on an account near its limit. Before suggesting new prompts, the agent says how many slots are left.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/): not applicable, no code changed
  • yarn typecheck passes (run from web/): not applicable, no code changed
  • yarn format:check passes (run from web/): not applicable, no code changed
  • Changes are focused — one concern per PR

The field names and cta values were checked against web/src/lib/prompt-usage-summary.ts and web/src/app/api/mcp/prompt-usage/route.ts in #1053.

🤖 Generated with Claude Code

cihan-gyk and others added 2 commits October 14, 2026 13:18
- List the get_prompt_usage MCP tool and its REST mirror GET
  /api/mcp/prompt-usage (ansvisor#1053): the brand's active, paused and total
  prompts and the account's prompt locations against the plan limit,
  as on the Tracked Prompts usage cards.
- Explain the unit: prompt locations, account-wide; paused prompts use
  no slots, and resuming one needs free slots like adding one.
- In the prompt coverage audit, check the slots left before suggesting
  new prompts; a null limit means unlimited.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Skills follow-up for the new get_prompt_usage MCP tool (#1053): both AEO coach skills now list it and check the slots left before suggesting new prompts. Stacked on #1033; should merge after #1053. Ready for review when you have a moment.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, approving. Against main the diff is only the two skill files. The field names, the cta values, the tool name and its brand_id argument match what #1053 merged in prompt-usage-summary.ts and the MCP server.

@gkhngyk
gkhngyk merged commit 417b81d into ansvisor:main Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants