Skip to content

docs(skills): teach the AEO coach the Content Editor, prompt suggestion, competitor and report tools and get_action's removed counts (AC-009) - #1548

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:docs/skills-content-tools
Oct 26, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:docs/skills-content-tools

Conversation

@cihan-gyk

@cihan-gyk cihan-gyk commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The AEO coach skill and the MCP guide had drifted from the server: 14 of the 50 tools in web/src/lib/mcp/server.ts weren't in the skill at all, and get_action's AC-009 fields weren't described. This brings them level. Docs only.

skills/ansvisor-aeo-coach/SKILL.md

  • Brand & visibility:
    • list_competitors: the setup list, not a ranking.
    • list_reports / get_report: saved snapshots. They don't regenerate, so their numbers aren't today's.
  • Prompts & topics:
    • list_prompt_suggestions: est_volume is a low-confidence guess, and stale means nothing current. New suggestions come from the dashboard.
    • accept_prompt_suggestion: uses a prompt location; the plan-limit message is relayed as it is.
    • dismiss_prompt_suggestion.
  • A new Content Editor group with all 8 tools:
    • list_content_drafts, get_content_draft, get_content_sources, get_content_impact;
    • create_content_draft, add_content_source, suggest_content_changes, set_content_draft_ready, marked (write).
    • It says what each returns, when a write is refused, and that none calls an LLM.
  • Action Center: get_action's payload when part of what an action is about was removed (fix(action-center): list an action's Affected rows from what it kept, as its count does (AC-009) #1409): targetCount is what's left, plus createdTargetCount, removedCount and removedLabels. The Markdown export's Affected list leaves out what was removed.
  • Two short workflows:
    • 11, prompt suggestions: list → get_prompt_usage → accept or dismiss after the user confirms;
    • 12, Content Editor: drafts → sources → suggestions → Mark ready → impact.
  • Workflow 5 points to workflow 11.

skills/README.md

  • Prompt suggestions, Content Editor drafts and saved reports are added to what the skill covers.
  • The Content Editor writes are added to the list of tools used only on request.

docs/guides/mcp-server.mdx

  • The tool count goes from 36 to 50.
  • A Content Editor table lists the 8 tools.

Each claim was checked against the tool's registration and implementation (web/src/lib/mcp/content.ts, data.ts, action-center/entity-counts.ts, affected.ts).

Left as they are:

  • The standalone skill names REST endpoints, not MCP tools, and nothing in it is now wrong. The Content Editor's REST routes (web/src/app/api/mcp/content-drafts/…) aren't in it yet. Prompt suggestions, competitors and reports have no REST mirror. That's a separate follow-up.

Related issue

None. This keeps the skills in step with the MCP tools, as #1033, #1085 and #1127 did.

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. Read the new sections of skills/ansvisor-aeo-coach/SKILL.md against web/src/lib/mcp/server.ts: every registered tool is now named.
    for t in $(grep -A1 "server.registerTool(" web/src/lib/mcp/server.ts | grep -oE "'[a-z_]+'" | tr -d "'"); do grep -q "$t" skills/ansvisor-aeo-coach/SKILL.md || echo "missing $t"; done
    It prints nothing.
  2. The skill's description fits the Agent Skills limit of 1,024 characters (983 now):
    python3 -c "import yaml; s=open('skills/ansvisor-aeo-coach/SKILL.md').read(); print(len(yaml.safe_load(s.split('---',2)[1])['description'].strip()))"
  3. With the skill installed and the MCP server connected, ask "What's waiting in the Content Editor?" and "Which prompts should we start tracking?".

Checklist

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

🤖 Generated with Claude Code

…on, competitor and report tools and get_action's removed counts (AC-009), and list the Content Editor tools in the MCP guide

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

mintlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit d6262db.

Approve preview

@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.

Needs changes.

What I checked:

  • The count. server.ts on main registers 50 tools. On main the skill was missing exactly the 14 the PR names. With this PR every one of the 50 is described in bold in the skill, the guide's tables have 50 rows, one per tool, and the "50 tools" line is right. The old "36" was the only tool count in the docs. No tool, argument or field named here is missing from the code.
  • Prompt suggestions (data.ts:547-777).
    • The list holds the pending ones. stale is true when there are none or all have expired. est_volume is worded as the tool's own description words it, and nothing over MCP generates new ones.
    • Accept takes the platforms and models of the latest active prompt, or chatgpt-web when there is none, filtered by the plan. It uses the brand's own location and adds exactly one active location, so locationLimitMessage is the plan-limit message the skill tells the coach to pass on. A second accept of the same suggestion finds nothing.
    • Workflow 11 matches what get_prompt_usage and workflow 5 say about slots.
  • Competitors and reports. list_competitors returns id, name and domain. list_reports defaults to 50 and caps at 100. get_report returns the stored payload and never rebuilds it, so "don't quote them as today's" is right.
  • Content Editor (content.ts, content-schemas.ts).
    • The arguments, the 100-draft list, the statuses, the 7/30/90/365 periods with 30 as the default, the 30-day sources and the 20-suggestion cap (MAX_API_SUGGESTIONS) all match the code. So do the three refusals (published, open suggestions, writing), the dropped reasons, the off-domain source_url refusal and in_review for Mark ready.
    • create_content_draft writes in_review with author: 'agent'.
    • No tool calls a model: page type detection is rule-based.
    • Any key in the organization can call the writes, as any member can do them in the editor. The docs claim nothing about roles.
  • get_action (AC-009). withEntityCounts sets targetCount to the count left and adds createdTargetCount, removedCount, and removedLabels (at most 20). currentPriorityReason and currentTaskParams count only what is left. 00244 marks a prompt deleted or paused, or a competitor deleted. The Markdown export's Affected list leaves out what was removed (affectedOf).
  • Text. No customer names, hosts or secrets. The PR adds no links, and the existing ones resolve.
  • Merge. Docs only. Main hasn't touched these files, or the code they describe, since the PR's base. It merges cleanly on main (c58edb8).
  • Before the API deploy. The tools are in the web app, which is live already, and none of them needs the API. The guide goes out with the merge, and nothing breaks.

Fix before merge:

  1. The skill's description is now 1,034 characters, over the 1,024 the Agent Skills spec allows (skills/ansvisor-aeo-coach/SKILL.md:3-19). On main it was 991.
    • skill-creator's quick_validate.py refuses a description over 1,024. Where an install checks the limit, the skill won't load, and skills/README.md has people paste this file into claude.ai.
    • Fix: trim it. For example, "Requires the Ansvisor MCP server connected to the client … ; without MCP, use the sibling …" brings it to 1,015. Dropping "get_mentions_summary," from the examples leaves more room.
    • Add the check to How to test: the YAML value's length, stripped, is at most 1,024.

Follow-ups:
2. For a new page that's published, get_content_impact says "This draft is a new page, not live yet" (code on main: web/src/lib/mcp/content.ts:383).

  • It reads only source_url. A page marked published gets published_url (server/src/lib/content-published.js:291), and source_url stays empty for a create draft. The Live page tab reads publishedUrl ?? sourceUrl (_side-panel.tsx:554).
  • So the skill's "Once the page is live, get_content_impact … says whether it paid off" (SKILL.md:658) and "as the Live page tab reads it" (:269-274, guide :306) don't hold for a new page. The coach would tell the person their page isn't live. The tool's own description already promises "or published".
  • Fix, in code: add published_url to DRAFT_COLUMNS, and read published_url ?? source_url in getContentImpactFor, as the tab does. The docs can stay as they are.
  1. "Paid off" compares fixed windows (SKILL.md:658-663).
    • The windows are the last N whole UTC days, ending yesterday, against the N before. They aren't the time before and after the page went live, and no tool returns the date it went live. A page optimized 10 days ago, read over 30 days, is mostly the old page.
    • Fix: add "The windows are the last days against the days before, not before and after it went live: pick the period closest to how long it has been live, and say so."
  2. set_content_draft_ready isn't quite the editor's Mark ready (SKILL.md:290-293, :655-657; guide :310).
    • In the editor, Mark ready opens Before you publish. Under Trust 60 it warns and logs a "Mark ready anyway" (00260). Over MCP neither happens.
    • For an action that names several pages, the writing task completes only once each page has a ready draft (action-drafts.ts:125-137). Until then action_tasks_done is 0.
    • Fix: word it as "sets the status as Mark ready does, without the editor's Before you publish check (point the person to it with editor_path first). A linked action's writing task completes once every page it names has a ready draft (action_tasks_done)."

…, and say what set_content_draft_ready skips and what get_content_impact's windows compare (review)

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

Copy link
Copy Markdown
Collaborator Author

Thanks. Fixed in d6262db:

  1. The description is 983 characters now, under the 1,024 limit:

    • get_mentions_summary is dropped from the examples;
    • the MCP line is shorter: "Requires the Ansvisor MCP server connected to the client (…); without MCP, use the sibling ansvisor-aeo-coach-standalone skill."
    • How to test now checks the YAML value's length, stripped.
  2. get_content_impact's windows. Workflow 12 now says the windows are the last days against the days before, not before and after the page went live: pick the period closest to how long it has been live, and say so.

  3. set_content_draft_ready now reads "sets the status as the editor's Mark ready does … It skips the editor's Before you publish check (its Trust warning), so point the person to it with editor_path first. A linked action's writing task completes once every page the action names has a ready draft (action_tasks_done; 0 until then)." Workflow 12 step 5 gives the editor_path before offering it, and the guide's row says the same.

  4. get_content_impact on a published new page is a code fix (published_url ?? source_url, as the Live page tab reads it). It goes in a separate PR, so the docs stay as they are.

🤖 Generated with Claude Code

gkhngyk pushed a commit that referenced this pull request Oct 26, 2026
…, as the Live page tab does (#1548 review) (#1554)

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>

@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.

Looks good, with follow-ups.

What I checked:

  • Round 34's items:
    1. The description. Done. I read it as YAML reads a literal block: indent stripped, lines joined with newlines. It is 983 characters, or 984 with the newline the block keeps. On main it's 991.
      • get_mentions_summary has left the examples, but the body still describes it.
      • All 50 tools registered in server.ts are still named in bold in the skill, and each still has a row in the guide.
      • How to test now checks the stripped length.
    2. get_content_impact on a published new page. Moved to #1554. That PR reads published_url ?? source_url, as the Live page tab does. With it, "as the Live page tab reads it" holds (SKILL.md:269-274, guide :306), and so does "Once the page is live" (:662). "A draft of a new page, not live yet, has none" stays true. The two PRs merge cleanly together.
    3. "Paid off" windows. Done (SKILL.md:666-669). This matches content_page_impact (00209): the last days whole UTC days, ending yesterday, against the days before. No tool returns when a page went live yet, so the coach has to ask. #1554's follow-up covers that.
    4. set_content_draft_ready. Done (:290-296, :658-661, guide :310). This matches setContentDraftReadyFor and completeDraftTasks:
      • only a draft becomes ready, and a ready version is kept;
      • the editor's Before you publish (with its Mark ready anyway log) doesn't run;
      • an optimize action that names several pages completes 0 tasks until each page has a ready or published draft.
  • Regressions. The new commit changes only these lines.
  • Merge. Docs only. Since the PR's base, main (307670b) hasn't touched the three files or the code they describe. #1550's editor changes leave Mark ready and Before you publish as they were. It merges cleanly.
  • Before the API deploy. Nothing here needs the API.

Follow-up:

  1. After step 5, a draft that's already ready reads as "0 tasks" (SKILL.md:658-661).
    • Before you publish ends in the editor's Mark ready (_draft-editor.tsx:3312). A person who runs it usually marks the draft ready there, and the editor completes the action's task.
    • If set_content_draft_ready runs after that, it returns status: 'ready' with action_tasks_done: 0 (content.ts:535 on main). The skill's "0 until then" reads that as pages still waiting.
    • Fix: "If they marked it ready there, it's done. Otherwise offer set_content_draft_ready." Also add to the tool's entry: "A draft that's already ready comes back as it is, with action_tasks_done: 0."

@gkhngyk
gkhngyk merged commit fffc519 into ansvisor:main Oct 26, 2026
6 checks passed
gkhngyk pushed a commit that referenced this pull request Oct 27, 2026
…t_content_draft, and say a ready draft comes back as it is (#1548, #1554 review) (#1559)

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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