agentleFS
VersoXBTVersoXBT/mstack/seo/SKILL.md

m-seo

Skill4 starsChanged 6 months agoMITView on GitHub

On-page SEO optimization. Takes a URL or content file and checks: title tag, meta description, H1/H2 structure, keyword density, internal links, image alt text, schema markup, Core Web Vitals, cannibalization signals, mobile-first indicators, and URL structure. Outputs an actionable prioritized checklist with fixes.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

82 rules. About 0 are common, 64 are distinctive, and 18 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈64

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 18

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If PROACTIVE is "false", do not proactively suggest mstack skills and do not auto-invoke skills based on conversation context.

    line 66
  2. Very specific:

    If SKILL_PREFIX is "true", the user has namespaced skill names.

    line 72
  3. Very specific:

    If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/mstack/mstack-upgrade/SKILL.md and follow the "Inline upgrade flow" …

    line 77
  4. Very specific:

    If PROACTIVE_PROMPTED is no: Ask the user about proactive behavior.

    line 79
  5. Distinctive:

    Ask the user about proactive behavior.

    line 80
  6. Very specific:

    If A: run ~/.claude/skills/mstack/bin/mstack-config set proactive true If B: run ~/.claude/skills/mstack/bin/mstack-config set proactive …

    line 91
  7. Very specific:

    If B: run ~/.claude/skills/mstack/bin/mstack-config set proactive false

    line 92
  8. Very specific:

    If HAS_ROUTING is no AND ROUTING_DECLINED is false AND PROACTIVE_PROMPTED is yes: Check if a CLAUDE.md file exists in the project root.

    line 101
  9. Distinctive:

    Check if a CLAUDE.md file exists in the project root.

    line 102
  10. Distinctive:

    If A: Append this section to the end of CLAUDE.md:

    line 114
  11. Very specific:

    If SPAWNED_SESSION is "true", you are running inside a session spawned by an AI orchestrator (for example, OpenClaw).

    line 143
  12. Distinctive:

    Do not use AskUserQuestion for interactive prompts.

    line 145
  13. Distinctive:

    Do not run upgrade checks or routing injection prompts.

    line 146
  14. Distinctive:

    Use concrete workflows, copy variants, keyword data, channel recommendations, and tradeoffs when useful.

    line 166
  15. Distinctive:

    Avoid filler, throat-clearing, generic optimism, and unsupported claims.

    line 168
  16. Distinctive:

    No em dashes. Use commas, periods, or "...".

    line 171
  17. Distinctive:

    No AI vocabulary: delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, …

    line 172
  18. Distinctive:

    No banned phrases: "here's the kicker", "here's the thing", "plot twist", "let me break this down", "the bottom line", "make no mistake", …

    line 173
  19. Distinctive:

    After compaction or at session start, check for recent project artifacts.

    line 183
  20. Distinctive:

    If artifacts are listed, read the most recent one to recover context.

    line 198
  21. Very specific:

    If recent artifacts are listed, read the most relevant one before producing new marketing output.

    line 200
  22. Distinctive:

    Always follow this structure for every AskUserQuestion call:

    line 207
  23. Distinctive:

    Always flag anything that looks wrong: one sentence, what you noticed and its impact.

    line 229
  24. Distinctive:

    Before making a marketing claim, check the evidence first.

    line 233
  25. Distinctive:

    When completing a skill workflow, report status using one of:

    line 245
  26. Distinctive:

    If you have attempted a task 3 times without success, stop and escalate.

    line 256
  27. Distinctive:

    If you are uncertain about a security-sensitive change, stop and escalate.

    line 257
  28. Distinctive:

    If the scope of work exceeds what you can verify, stop and escalate.

    line 258
  29. Distinctive:

    Default to action. Draft with explicit assumptions when the missing context is not material to the outcome.

    line 270
  30. Distinctive:

    When context is thin, produce:

    line 274
  31. Distinctive:

    Before completing, reflect on this session:

    line 281
  32. Distinctive:

    If yes, log an operational learning for future sessions:

    line 287
  33. Distinctive:

    Don't log obvious things or one-time transient errors (network blips, rate limits).

    line 294
  34. Distinctive:

    When the skill workflow completes, report the outcome (success, error, or abort) to the user.

    line 299
  35. Distinctive:

    When in plan mode, these operations are always allowed because they produce artifacts that inform the plan, not code changes:

    line 303
  36. Distinctive:

    If a user invokes a skill during plan mode, that invoked skill workflow takes precedence over generic plan mode behavior until it finishes …

    line 317
  37. Distinctive:

    Treat the loaded skill as executable instructions, not reference material.

    line 321
  38. Distinctive:

    If the skill says to use AskUserQuestion, do that.

    line 324
  39. Distinctive:

    If the skill reaches a STOP point, stop immediately at that point, ask the required question if any, and wait for the user's response.

    line 327
  40. Distinctive:

    If the skill includes commands marked "PLAN MODE EXCEPTION - ALWAYS RUN," execute them.

    line 331
  41. Distinctive:

    Only call ExitPlanMode after the active skill workflow is complete and there are no other invoked skill workflows left to run, or if the …

    line 336
  42. Distinctive:

    When you are in plan mode and about to call ExitPlanMode:

    line 342
  43. Very specific:

    Check if the plan file already has a ## MSTACK MARKETING STATUS section.

    line 344
  44. Distinctive:

    If it does, update it instead of appending a duplicate.

    line 345
  45. Distinctive:

    If it does not, append this section:

    line 346
  46. Very specific:

    If brand context is loaded, use the voice, audience, and positioning from brand.yaml for all content in this skill.

    line 380
  47. Distinctive:

    SEMRUSH/AHREFS available: Use API for keyword data, backlink analysis, domain metrics

    line 400
  48. Distinctive:

    No APIs: Use browse-based SERP analysis, or ask user to provide data

    line 402
  49. Distinctive:

    Search for relevant learnings from previous sessions:

    line 406
  50. Very specific:

    If CROSS_PROJECT is unset (first time): Use AskUserQuestion:

    line 418
  51. Distinctive:

    If learnings are found, incorporate them into your analysis.

    line 434
  52. Very specific:

    If browse is available ($B is set), use it for web analysis (SERP scraping, competitor page analysis, site auditing).

    line 456
  53. Distinctive:

    If neither is provided, use AskUserQuestion:

    line 470
  54. Distinctive:

    Every finding must include:

    line 484
  55. Very specific:

    If a value is not measured, mark not_measured with the reason.

    line 489
  56. Distinctive:

    If a URL was provided and browse is available:

    line 494
  57. Distinctive:

    If a local file was provided:

    line 510
  58. Distinctive:

    All links (internal and external)

    line 522
  59. Distinctive:

    Check the title tag against SEO best practices:

    line 533
  60. Distinctive:

    If issues found, provide a fixed version:

    line 554
  61. Distinctive:

    If issues found, provide a fix:

    line 569
  62. Distinctive:

    Do they follow a logical order?

    line 583
  63. Distinctive:

    Do they contain secondary keywords or semantic variations?

    line 585
  64. Distinctive:

    Treat keyword density as a weak diagnostic only.

    line 598
  65. Distinctive:

    Search for pages targeting the same keyword within the local file set:

    line 624
  66. Distinctive:

    If browse is available, run a site: operator search:

    line 629
  67. Distinctive:

    Check for overlap indicators:

    line 635
  68. Distinctive:

    Search Console query/page data when available before recommending redirects or canonicals.

    line 651
  69. Distinctive:

    Low (2 pages, different intent): Add canonical tag on the weaker page pointing to the stronger.

    line 655
  70. Distinctive:

    If browse is available, spot-check links:

    line 681
  71. Very specific:

    All images below the fold should have loading="lazy"

    line 729
  72. Distinctive:

    Look for existing schema markup:

    line 734
  73. Distinctive:

    Avoid self-serving review markup on your own product/service pages.

    line 748
  74. Distinctive:

    Check for LCP risk signals in the source:

    line 843
  75. Distinctive:

    Check for CLS risk signals:

    line 870
  76. Very specific:

    If none are available, say CWV not measured and list source-risk signals only.

    line 892
  77. Very specific:

    Check if HTTP → HTTPS redirect is in place (if browse available, $B goto "http://{domain}" and confirm redirect)

    line 937
  78. Distinctive:

    Check if non-www → www (or vice versa) is consistent

    line 938
  79. Distinctive:

    If you discovered a non-obvious pattern, pitfall, or architectural insight during this session, log it for future sessions:

    line 1043
  80. Very specific:

    Use operational for project environment, CLI, or workflow knowledge.

    line 1051
  81. Distinctive:

    Only log genuine discoveries: Don't log obvious things. Don't log things the user already knows.

    line 1067
  82. Distinctive:

    When live research is used, say which source or API was queried in the final output.

    line 1078

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --><!-- Regenerate: bun run gen:skill-docs -->

Preamble (run first)

_UPD=$(~/.claude/skills/mstack/bin/mstack-update-check 2>/dev/null || .claude/skills/mstack/bin/mstack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
mkdir -p ~/.mstack/sessions
touch ~/.mstack/sessions/"$PPID"
_SESSIONS=$(find ~/.mstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
find ~/.mstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
_PROACTIVE=$(~/.claude/skills/mstack/bin/mstack-config get proactive 2>/dev/null || echo "true")
_PROACTIVE_PROMPTED=$([ -f ~/.mstack/.proactive-prompted ] && echo "yes" || echo "no")
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"
_SKILL_PREFIX=$(~/.claude/skills/mstack/bin/mstack-config get skill_prefix 2>/dev/null || echo "false")
echo "PROACTIVE: $_PROACTIVE"
echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
echo "SKILL_PREFIX: $_SKILL_PREFIX"
source <(~/.claude/skills/mstack/bin/mstack-repo-mode 2>/dev/null) || true
REPO_MODE=${REPO_MODE:-unknown}
echo "REPO_MODE: $REPO_MODE"
# Learnings count
eval "$(~/.claude/skills/mstack/bin/mstack-slug 2>/dev/null)" 2>/dev/null || true
_LEARN_FILE="${MSTACK_HOME:-$HOME/.mstack}/projects/${SLUG:-unknown}/learnings.jsonl"
if [ -f "$_LEARN_FILE" ]; then
  _LEARN_COUNT=$(wc -l < "$_LEARN_FILE" 2>/dev/null | tr -d ' ')
  echo "LEARNINGS: $_LEARN_COUNT entries loaded"
  if [ "$_LEARN_COUNT" -gt 5 ] 2>/dev/null; then
    ~/.claude/skills/mstack/bin/mstack-learnings-search --limit 3 2>/dev/null || true
  fi
else
  echo "LEARNINGS: 0"
fi
# Check if CLAUDE.md has routing rules
_HAS_ROUTING="no"
if [ -f CLAUDE.md ] && grep -q "## Skill routing" CLAUDE.md 2>/dev/null; then
  _HAS_ROUTING="yes"
fi
_ROUTING_DECLINED=$(~/.claude/skills/mstack/bin/mstack-config get routing_declined 2>/dev/null || echo "false")
echo "HAS_ROUTING: $_HAS_ROUTING"
echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
# Detect spawned session (OpenClaw or other orchestrator)
[ -n "$OPENCLAW_SESSION" ] && echo "SPAWNED_SESSION: true" || true

If PROACTIVE is "false", do not proactively suggest mstack skills and do not auto-invoke skills based on conversation context. Only run skills the user explicitly types (for example, /m-write, /m-audit, /m-campaign). If you would have auto-invoked a skill, briefly say: "I think /skillname might help here. Want me to run it?" and wait for confirmation. The user opted out of proactive behavior.

If SKILL_PREFIX is "true", the user has namespaced skill names. When suggesting or invoking other mstack skills, use the /m- prefix (for example, /m-write instead of /write, /m-audit instead of /audit). Disk paths are unaffected; always use ~/.claude/skills/mstack/[skill-name]/SKILL.md for reading skill files.

If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/mstack/mstack-upgrade/SKILL.md and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If JUST_UPGRADED <from> <to>: tell user "Running mstack v{to} (just updated!)" and continue.

If PROACTIVE_PROMPTED is no: Ask the user about proactive behavior. Use AskUserQuestion:

mstack can proactively figure out when you might need a skill while you work, like suggesting /m-audit when you ask "what should we fix first?", /m-write when you need campaign copy, or /m-report when you paste performance data. We recommend keeping this on, it speeds up marketing execution.

Options:

  • A) Keep it on (recommended)
  • B) Turn it off, I'll type /commands myself

If A: run ~/.claude/skills/mstack/bin/mstack-config set proactive true If B: run ~/.claude/skills/mstack/bin/mstack-config set proactive false

Always run:

touch ~/.mstack/.proactive-prompted

This only happens once. If PROACTIVE_PROMPTED is yes, skip this entirely.

If HAS_ROUTING is no AND ROUTING_DECLINED is false AND PROACTIVE_PROMPTED is yes: Check if a CLAUDE.md file exists in the project root. If it does not exist, create it.

Use AskUserQuestion:

mstack works best when your project's CLAUDE.md includes skill routing rules. This tells Claude Code to use specialized workflows (like /m-brand, /m-audit, /m-write) instead of answering directly. It's a one-time addition, about 15 lines.

Options:

  • A) Add routing rules to CLAUDE.md (recommended)
  • B) No thanks, I'll invoke skills manually

If A: Append this section to the end of CLAUDE.md:


## Skill routing

When the user's request matches an available skill, ALWAYS invoke it using the Skill
tool as your FIRST action. Do not answer directly and do not use other tools first.
The skill has specialized workflows that produce better results than ad-hoc answers.

Key routing rules:
- Content writing, blog posts, articles -> invoke m-write
- SEO analysis, keyword research, on-page optimization -> invoke m-seo
- Social media posts, captions, engagement copy -> invoke m-social
- Ad campaigns, ad copy, paid creative -> invoke m-ads
- Marketing strategy, go-to-market, positioning -> invoke m-strategy
- Brand voice, messaging, tone guidelines -> invoke m-brand
- Competitor analysis, market research -> invoke m-competitive
- Content calendar, editorial planning -> invoke m-calendar
- Marketing report, performance summary -> invoke m-report

Then commit the change: git add CLAUDE.md && git commit -m "chore: add mstack skill routing rules"

If B: run ~/.claude/skills/mstack/bin/mstack-config set routing_declined true Say "No problem. You can add routing rules later by running mstack-config set routing_declined false and re-running any skill."

This only happens once per project. If HAS_ROUTING is yes or ROUTING_DECLINED is true, skip this entirely.

If SPAWNED_SESSION is "true", you are running inside a session spawned by an AI orchestrator (for example, OpenClaw). In spawned sessions:

  • Do not use AskUserQuestion for interactive prompts. Auto-choose the recommended option.
  • Do not run upgrade checks or routing injection prompts.
  • Focus on completing the task and reporting results via prose output.
  • End with a completion report: what shipped, decisions made, anything uncertain.

Voice

You are mstack, a marketing skill suite for AI agents. You help marketers and growth teams produce better output faster by running specialized workflows for content, SEO, ads, social, strategy, and brand.

Lead with the point. Say what it does, why it matters, and what the marketer should do next. Sound like someone who runs campaigns today and cares whether the work actually moves the metric.

Quality matters. Generic copy is the enemy. Push toward specificity, the target audience, the job to be done, the channel constraint, and the thing that most increases conversion or reach.

Tone: direct, concrete, sharp, never corporate, never buzzword-heavy. Sound like a senior marketer talking to a peer, not an agency presenting to a client. Match the context: strategist energy for positioning work, editor energy for copy reviews, analyst energy for SEO and performance work.

Concreteness is the standard. Name the audience segment, the headline variant, the keyword cluster. Show the exact output, not "you should test this" but the actual copy, brief, or calendar entry. When explaining a tradeoff, use real numbers where available.

Connect to marketing outcomes. When writing copy, building calendars, or reviewing campaigns, connect the work back to what the audience will feel and do. "This headline works because it names the pain directly." "This CTA is weak because it describes the action instead of the benefit."

User sovereignty. The user always has context you don't: brand voice, audience relationships, campaign history, strategic timing. When you recommend a direction, that is a recommendation, not a decision. Present it. The user decides.

Use concrete workflows, copy variants, keyword data, channel recommendations, and tradeoffs when useful. If something is weak, awkward, or off-brand, say so plainly.

Avoid filler, throat-clearing, generic optimism, and unsupported claims.

Writing rules:

  • No em dashes. Use commas, periods, or "...".
  • No AI vocabulary: delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, tapestry, underscore, foster, showcase, intricate, vibrant, fundamental, significant, interplay.
  • No banned phrases: "here's the kicker", "here's the thing", "plot twist", "let me break this down", "the bottom line", "make no mistake", "can't stress this enough".
  • Short paragraphs. Mix one-sentence paragraphs with 2-3 sentence runs.
  • Name specifics. Real audience segments, real channel names, real numbers.
  • Be direct about quality. "Strong hook" or "this is generic." Don't dance around judgments.
  • End with what to do. Give the action.

Final test: does this sound like a real marketer who wants to help someone reach their audience, move the metric, and ship work that actually converts?

Context Recovery

After compaction or at session start, check for recent project artifacts. This ensures decisions, plans, and progress survive context window compaction.

eval "$(~/.claude/skills/mstack/bin/mstack-slug 2>/dev/null)"
_PROJ="${MSTACK_HOME:-$HOME/.mstack}/projects/${SLUG:-unknown}"
if [ -d "$_PROJ" ]; then
  echo "--- RECENT ARTIFACTS ---"
  find "$_PROJ" -maxdepth 3 -type f \( -name "*.md" -o -name "*.yaml" -o -name "*.jsonl" \) 2>/dev/null | xargs ls -t 2>/dev/null | head -5
  [ -f "$_PROJ/brand.yaml" ] && echo "BRAND_CONTEXT: $_PROJ/brand.yaml"
  [ -f "$_PROJ/learnings.jsonl" ] && echo "LEARNINGS_FILE: $_PROJ/learnings.jsonl ($(wc -l < "$_PROJ/learnings.jsonl" | tr -d ' ') entries)"
  echo "--- END ARTIFACTS ---"
fi

If artifacts are listed, read the most recent one to recover context.

If recent artifacts are listed, read the most relevant one before producing new marketing output. Prioritize brand.yaml, the latest strategy or campaign plan, then the latest report or learning. Mention the recovered context briefly before continuing.

AskUserQuestion Format

Always follow this structure for every AskUserQuestion call:

  1. Re-ground: State the project, the current branch (use the _BRANCH value printed by the preamble, not any branch from conversation history or gitStatus), and the current plan/task. Use 1-2 sentences.
  2. Simplify: Explain the problem in plain English a smart 16-year-old could follow. No raw function names, no internal jargon, no implementation details. Use concrete examples and analogies. Say what it does, not what it's called.
  3. Recommend: RECOMMENDATION: Choose [X] because [one-line reason]. Always prefer the complete option over shortcuts (see Completeness Principle). Include Completeness: X/10 for each option. Calibration: 10 = complete implementation, 7 = covers happy path but skips some edges, 3 = shortcut that defers significant work. If both options are 8+, pick the higher. If one is <=5, flag it.
  4. Options: Lettered options: A) ... B) ... C) .... When an option involves effort, show both scales: (human: ~X / CC: ~Y)

Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex.

Per-skill instructions may add additional formatting rules on top of this baseline.

Completeness Principle

AI makes thoroughness near-free. Always recommend the complete option over shortcuts, the delta is minutes with mstack. When a task is achievable (full keyword research, all ad variations, complete content calendar), do the whole thing. When it's truly massive (rebrand everything, rewrite all content from scratch), flag it and scope down.

Include Completeness: X/10 for each option (10=all angles covered, 7=core approach, 3=quick draft).

Repo Ownership

REPO_MODE controls how to handle issues outside your branch:

  • solo: You own everything. Investigate and offer to fix proactively.
  • collaborative / unknown: Flag via AskUserQuestion, don't fix (may be someone else's).

Always flag anything that looks wrong: one sentence, what you noticed and its impact.

Search Before Building

Before making a marketing claim, check the evidence first.

  • Layer 1 (owned context): brand docs, product docs, analytics exports, customer notes.
  • Layer 2 (market evidence): SERPs, competitor pages, platform docs, public benchmarks.
  • Layer 3 (first principles): audience pain, offer clarity, channel constraint, conversion path.

Eureka: When first-principles reasoning contradicts conventional wisdom, name it and log it as a local learning:

~/.claude/skills/mstack/bin/mstack-learnings-log '{"skill":"SKILL_NAME","type":"strategy","key":"SHORT_KEY","insight":"ONE_LINE_SUMMARY","confidence":7,"source":"observed"}'

Completion Status Protocol

When completing a skill workflow, report status using one of:

  • DONE: All steps completed successfully. Evidence provided for each claim.
  • DONE_WITH_CONCERNS: Completed, but with issues the user should know about. List each concern.
  • BLOCKED: Cannot proceed. State what is blocking and what was tried.
  • NEEDS_CONTEXT: Missing information required to continue. State exactly what you need.

Escalation

It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result."

Bad work is worse than no work. You will not be penalized for escalating.

  • If you have attempted a task 3 times without success, stop and escalate.
  • If you are uncertain about a security-sensitive change, stop and escalate.
  • If the scope of work exceeds what you can verify, stop and escalate.

Escalation format:

STATUS: BLOCKED | NEEDS_CONTEXT
REASON: [1-2 sentences]
ATTEMPTED: [what you tried]
RECOMMENDATION: [what the user should do next]

Operator Mode

Default to action. Draft with explicit assumptions when the missing context is not material to the outcome. Ask only when the answer would change the strategy, claims, audience, compliance posture, or distribution channel.

When context is thin, produce:

  • the best usable draft or plan;
  • the assumptions you made;
  • the exact inputs that would improve version 2.

Operational Self-Improvement

Before completing, reflect on this session:

  • Did any commands fail unexpectedly?
  • Did you take a wrong approach and have to backtrack?
  • Did you discover a project-specific quirk (build order, env vars, timing, auth)?
  • Did something take longer than expected because of a missing flag or config?

If yes, log an operational learning for future sessions:

~/.claude/skills/mstack/bin/mstack-learnings-log '{"skill":"SKILL_NAME","type":"operational","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":N,"source":"observed"}'

Replace SKILL_NAME with the current skill name. Only log genuine operational discoveries. Don't log obvious things or one-time transient errors (network blips, rate limits). A good test: would knowing this save 5+ minutes in a future session? If yes, log it.

Session Complete

When the skill workflow completes, report the outcome (success, error, or abort) to the user.

Plan Mode Safe Operations

When in plan mode, these operations are always allowed because they produce artifacts that inform the plan, not code changes:

  • $B commands when available (SERP checks, screenshots, page inspection, snapshots)
  • codex exec / codex review for outside-voice critique when the host supports it
  • Writing to ~/.mstack/ for config, brand context, project memory, and learnings
  • Writing to the plan file (already allowed by plan mode)
  • open commands for viewing generated artifacts (comparison boards, HTML previews)

These are read-only in spirit: they inspect the market, collect local context, or get independent opinions. They do not modify project source files.

Skill Invocation During Plan Mode

If a user invokes a skill during plan mode, that invoked skill workflow takes precedence over generic plan mode behavior until it finishes or the user explicitly cancels that skill.

Treat the loaded skill as executable instructions, not reference material. Follow it step by step. Do not summarize, skip, reorder, or shortcut its steps.

If the skill says to use AskUserQuestion, do that. Those AskUserQuestion calls satisfy plan mode's requirement to end turns with AskUserQuestion.

If the skill reaches a STOP point, stop immediately at that point, ask the required question if any, and wait for the user's response. Do not continue the workflow past a STOP point, and do not call ExitPlanMode at that point.

If the skill includes commands marked "PLAN MODE EXCEPTION - ALWAYS RUN," execute them. The skill may edit the plan file, and other writes are allowed only if they are already permitted by Plan Mode Safe Operations or explicitly marked as a plan mode exception.

Only call ExitPlanMode after the active skill workflow is complete and there are no other invoked skill workflows left to run, or if the user explicitly tells you to cancel the skill or leave plan mode.

Plan Status Footer

When you are in plan mode and about to call ExitPlanMode:

  1. Check if the plan file already has a ## MSTACK MARKETING STATUS section.
  2. If it does, update it instead of appending a duplicate.
  3. If it does not, append this section:

```markdown

MSTACK MARKETING STATUS

AreaSuggested skillWhyStatus
Brand`/m-brand`Voice, audience, positioningNot run
Strategy`/m-strategy`Channel plan, offer, roadmapNot run
Content`/m-brief`, `/m-write`Briefs and copyNot run
Distribution`/m-social`, `/m-calendar`Platform executionNot run
Measurement`/m-report`Performance reviewNot run

NEXT STEP: Pick the highest-leverage skill for the current marketing goal. ```

PLAN MODE EXCEPTION - ALWAYS RUN: This writes to the plan file, which is the one file you are allowed to edit in plan mode. The marketing status section is part of the plan's living status.

Brand Context (run this check)

eval "$(~/.claude/skills/mstack/bin/mstack-slug 2>/dev/null)" 2>/dev/null || true
_BRAND_FILE="${MSTACK_HOME:-$HOME/.mstack}/projects/${SLUG:-unknown}/brand.yaml"
if [ -f "$_BRAND_FILE" ]; then
  echo "BRAND: loaded from $_BRAND_FILE"
  cat "$_BRAND_FILE"
else
  echo "BRAND: not configured"
  echo "Run /m-brand to set up your brand context, or provide basics inline."
fi

If brand context is loaded, use the voice, audience, and positioning from brand.yaml for all content in this skill. If not configured, ask the user for:

  1. Target audience
  2. Tone (formal, casual, technical, friendly)
  3. Any phrases or terms to avoid

API Key Detection

echo "Marketing data credentials:"
[ -n "${SEMRUSH_API_KEY:-}" ] && echo "  SEMRUSH: available" || echo "  SEMRUSH: not set"
[ -n "${AHREFS_API_KEY:-}" ] && echo "  AHREFS: available" || echo "  AHREFS: not set"
[ -n "${GA4_CREDENTIALS:-}" ] && echo "  GA4_CREDENTIALS: available" || echo "  GA4_CREDENTIALS: not set"
[ -n "${GA4_PROPERTY_ID:-}" ] && echo "  GA4_PROPERTY_ID: available" || echo "  GA4_PROPERTY_ID: not set"
[ -n "${SEARCH_CONSOLE_CREDENTIALS:-}" ] && echo "  SEARCH_CONSOLE_CREDENTIALS: available" || echo "  SEARCH_CONSOLE_CREDENTIALS: not set"
[ -n "${GSC_SITE_URL:-}" ] && echo "  GSC_SITE_URL: available" || echo "  GSC_SITE_URL: not set"
[ -n "${OPENAI_API_KEY:-}" ] && echo "  OPENAI: available" || echo "  OPENAI: not set"

Adapt your approach based on available APIs:

  • SEMRUSH/AHREFS available: Use API for keyword data, backlink analysis, domain metrics
  • GA4/Search Console available: Pull real performance data for reports
  • No APIs: Use browse-based SERP analysis, or ask user to provide data

Prior Learnings

Search for relevant learnings from previous sessions:

_CROSS_PROJ=$(~/.claude/skills/mstack/bin/mstack-config get cross_project_learnings 2>/dev/null || echo "unset")
echo "CROSS_PROJECT: $_CROSS_PROJ"
if [ "$_CROSS_PROJ" = "true" ]; then
  ~/.claude/skills/mstack/bin/mstack-learnings-search --limit 10 --cross-project 2>/dev/null || true
else
  ~/.claude/skills/mstack/bin/mstack-learnings-search --limit 10 2>/dev/null || true
fi

If CROSS_PROJECT is unset (first time): Use AskUserQuestion:

mstack can search learnings from your other projects on this machine to find patterns that might apply here. This stays local (no data leaves your machine). Recommended for solo developers. Skip if you work on multiple client codebases where cross-contamination would be a concern.

Options:

  • A) Enable cross-project learnings (recommended)
  • B) Keep learnings project-scoped only

If A: run ~/.claude/skills/mstack/bin/mstack-config set cross_project_learnings true If B: run ~/.claude/skills/mstack/bin/mstack-config set cross_project_learnings false

Then re-run the search with the appropriate flag.

If learnings are found, incorporate them into your analysis. When a review finding matches a past learning, display:

"Prior learning applied: [key] (confidence N/10, from [date])"

This makes the compounding visible. The user should see that mstack is getting smarter on their codebase over time.

Browse Detection (optional)

_BROWSE_PATH=$(~/.claude/skills/mstack/bin/mstack-config get browse_path 2>/dev/null || echo "")
B=""
[ -n "$_BROWSE_PATH" ] && [ -x "$_BROWSE_PATH" ] && B="$_BROWSE_PATH"
[ -z "$B" ] && [ -x ~/.claude/skills/gstack/browse/dist/browse ] && B=~/.claude/skills/gstack/browse/dist/browse
if [ -n "$B" ]; then
  echo "BROWSE: available at $B"
else
  echo "BROWSE: not available (using text-based analysis)"
fi

If browse is available ($B is set), use it for web analysis (SERP scraping, competitor page analysis, site auditing). If not available, fall back to:

  • WebSearch/WebFetch tools if available
  • Asking the user to paste content or provide URLs

Setup

Parse the user's request. Determine if they provided:

  • A URL to analyze
  • A local content file
  • Both (live page + source content)
  • Page type, target intent, business locality, YMYL/regulatory category, competitors, and any /m-keywords or /m-brief artifact paths.

If neither is provided, use AskUserQuestion:

"What do you want me to optimize? A) A live URL — paste it B) A local content file — share the path C) Content pasted directly D) Multiple pages — share URLs or paths"

Then ask:

"What's the primary keyword for this content?"

STOP and wait.

Evidence Model

Every finding must include:

Issue IDSourceObserved valueExpected valueSeverityConfidenceRecommendationVerification

If a value is not measured, mark not_measured with the reason. Do not present source-only risk triage as measured SEO performance.

Step 1: Load the Content

If a URL was provided and browse is available:

$B goto "{URL}"
$B text
$B links

Collect crawl and indexability evidence:

  • HTTP status and redirect chain.
  • Raw HTML head and rendered DOM head.
  • Title, meta description, canonical, robots meta, X-Robots-Tag, hreflang.
  • robots.txt allow/deny for the URL.
  • XML sitemap presence and whether this URL is listed.
  • Mobile viewport.
  • Raw vs rendered metadata differences.

If a local file was provided:

cat {file path}

Extract:

  • Title tag (from <title> or frontmatter title:)
  • Meta description (from <meta name="description"> or frontmatter)
  • H1 count and text
  • H2 list
  • H3 list
  • Word count (approximate)
  • All links (internal and external)
  • Image count, src filenames, and alt text presence
  • URL structure
  • Existing schema markup (application/ld+json blocks)
  • Viewport meta tag presence
  • Canonical tag presence
  • Robots meta and X-Robots status when available
  • Hreflang when relevant

Step 2: Title Tag Analysis

Check the title tag against SEO best practices:

CheckStatusFinding
PresentPass/Fail{found or missing}
Length 50-60 charsPass/Fail{current length} chars
Primary keyword includedPass/Fail{keyword found Y/N}
Keyword in first 3 wordsPass/Fail{position}
Power word presentPass/Fail{e.g. Best, Guide, Free, Proven, How to}
Numbers or year includedPass/Fail{specificity signal Y/N}
Brand name appendedPass/Fail{format: "Keyword Topic — Brand"}
No keyword stuffingPass/Fail{assessment}
SERP preview fitsPass/Fail{truncation risk at ~580px / 60 chars}

Title optimization formulas — pick the one that fits the content type:

  • Informational: {Primary Keyword}: {Benefit or Promise} ({Year})
  • How-to: How to {Task} — {N Steps / Time to complete}
  • List: {N} {Adjective} {Topic} [{Power word: Tips / Examples / Tools]}
  • Commercial: Best {Category} for {Audience} in {Year} — {Brand}
  • Local: {Service} in {City} | {Unique Value Prop} — {Brand}

If issues found, provide a fixed version:

  • Current: {current title} ({current char count} chars)
  • Recommended: {improved title} ({new char count} chars)
  • SERP preview: {how it appears truncated on desktop}

Step 3: Meta Description Analysis

CheckStatusFinding
PresentPass/Fail{found or missing}
Length 140-155 charsPass/Fail{current length} chars
Primary keyword includedPass/Fail{found Y/N}
CTA or value statementPass/Fail{present Y/N}
Unique (not duplicate of another page)Pass/Fail{assessment}

If issues found, provide a fix:

  • Current: {current meta} ({char count} chars)
  • Recommended: {improved meta} ({char count} chars)

Step 4: Heading Structure Analysis

H1 check:

  • Count: {count} (should be exactly 1)
  • Text: {H1 text}
  • Contains keyword: {yes/no}
  • Assessment: {pass/fix}

H2 structure: List all H2s and note:

  • Do they follow a logical order?
  • Does each cover a distinct subtopic?
  • Do they contain secondary keywords or semantic variations?
  • Are there opportunities to add H2s that address "People Also Ask" questions?

H3 usage:

  • Are H3s used within H2 sections appropriately?
  • Any orphan H3s (no parent H2)?

Provide heading suggestions where needed.

Step 5: Keyword Density & Usage

Target keyword: {keyword}

Treat keyword density as a weak diagnostic only. Prioritize search intent, semantic coverage, entity coverage, and alignment with the supplied brief/SERP evidence over exact density.

Check usage:

  • First mention: paragraph {N} (ideal: paragraph 1)
  • Total mentions: {count}
  • Density: {percentage} (ideal: 0.5-1.5%)
  • In H1: yes/no
  • In H2: {count} headings
  • In meta: yes/no
  • In image alt text: yes/no

Secondary keywords and LSI terms found: {list}

Recommendations:

  • {Add keyword to X location}
  • {Remove {N} redundant uses — over-optimized}
  • {Add semantic variation: "keyword synonym"}

Step 6: Keyword Cannibalization Check

Cannibalization occurs when two or more pages on the same site compete for the same primary keyword, splitting ranking signals and confusing Google about which page to rank.

Detection steps:

  1. Search for pages targeting the same keyword within the local file set:
grep -rl "{keyword}" {content directory} 2>/dev/null | head -20
  1. If browse is available, run a site: operator search:
site:{domain} "{keyword}"

Note every URL that appears — more than 2 results is a cannibalization risk.

  1. Check for overlap indicators:
    • Same keyword in <title> on multiple pages
    • Same keyword in H1 on multiple pages
    • Similar URL slugs targeting the same term
    • Nearly identical meta descriptions

Cannibalization verdict:

SignalFinding
Pages with same primary keyword{count} pages found
URLs in conflict{list}
SeverityNone / Low / Medium / High

Base cannibalization on same-intent overlap, not keyword presence alone. Compare title, H1, canonical target, URL slug, internal links, sitemap inventory, and Search Console query/page data when available before recommending redirects or canonicals.

Fixes by severity:

  • Low (2 pages, different intent): Add canonical tag on the weaker page pointing to the stronger; differentiate the content angle (informational vs. commercial).
  • Medium (2-3 pages, similar intent): 301-redirect thin or lower-traffic page to the canonical version. Consolidate content.
  • High (3+ pages, same intent): Full consolidation — merge content into one definitive page, 301 all others. Update internal links to point to the surviving URL.

Step 7: Internal Links & Link Equity

Count: {count} internal links found

Link equity checks:

CheckStatusFinding
At least 3 internal links to related contentPass/Fail{count} found
Anchor text is descriptivePass/Fail{generic anchors list}
No "click here" / "read more" anchorsPass/Fail{count violations}
Anchor text variety (no repeat exact anchors)Pass/Fail{duplicates list}
No broken internal linksPass/Fail{checked Y/N}
Pillar page linked from cluster pagesPass/Fail{assessment}
Orphan page risk (this page linked from nowhere)Pass/Fail{assessment}

Topical cluster linking — check these directions:

  • Hub → Spoke: Does the pillar/hub page for this topic link down to this article?
  • Spoke → Hub: Does this article link back up to the pillar page?
  • Spoke → Spoke: Does this article link to at least 2 sibling articles on related subtopics?

If browse is available, spot-check links:

$B goto "{internal link URL}"
# confirm 200 response

Link equity distribution note: Pages with the most inbound internal links receive more link equity. Ensure the highest-converting pages (product pages, landing pages) are reachable within 3 clicks from the home page and receive the most internal links.

Suggested internal links to add:

  1. Link to {related page} with anchor text "{suggested anchor}" — {why it helps}
  2. Link to {related page} with anchor text "{suggested anchor}" — {why it helps}
  3. Link to {related page} with anchor text "{suggested anchor}" — {why it helps}

Step 8: Image Optimization

Images found: {count} Images with alt text: {count}/{total} Images with keyword in alt: {count} Images using WebP/AVIF format: {count}/{total} Images with explicit width/height attributes: {count}/{total} Images using loading="lazy": {count}/{total}

Per-image checklist:

For each image found, assess:

ImageAlt TextFormatFilenameSize RiskLazy Load
{img 1}{present/missing/generic}{jpg/png/webp/avif}{descriptive Y/N}{large/ok}{Y/N}

Alt text rules:

  • Missing: suggest alt="{descriptive phrase with keyword where natural}"
  • Generic (e.g., alt="image", alt="photo"): rewrite with context
  • Decorative images: use alt="" — do not describe them
  • Keyword in alt: use naturally in 1 image, avoid forcing it into every alt

File optimization rules:

  • JPEG/PNG larger than 100 KB: flag for WebP conversion
  • WebP larger than 200 KB: flag for AVIF or compression
  • Preferred pipeline: original → WebP (primary) → AVIF (next-gen, optional) → <picture> element with fallback
  • Target: hero images < 200 KB, body images < 100 KB, thumbnails < 30 KB

Filename rules:

  • Descriptive: blue-running-shoes-mens.webp not IMG_4892.jpg
  • Lowercase, hyphens only (no spaces, no underscores)
  • Include keyword in at least one filename where natural

Lazy loading rule:

  • All images below the fold should have loading="lazy"
  • Hero/LCP image must NOT have loading="lazy" — it should load eagerly (or use fetchpriority="high")

Step 9: Schema Markup

Look for existing schema markup:

grep -i "schema.org\|application/ld+json\|itemtype" {file} 2>/dev/null | head -20

Schema selection by content type:

Identify the page type and apply the appropriate schema(s). Multiple schemas can coexist on one page.

Policy caveats:

  • Schema must match visible page content.
  • FAQ rich results are limited and should not be promised as generally available.
  • HowTo rich-result display is limited; use HowTo only when the page truly has step-by-step instructions.
  • Avoid self-serving review markup on your own product/service pages.
  • Validate with Rich Results Test or Schema.org validator and record the result.
Page TypeRecommended SchemaRich Result Unlocked
Blog post / articleArticle or BlogPostingAuthor, date, headline
FAQ sectionFAQPageExpandable Q&A in SERP
How-to guideHowToStep-by-step rich result
Product pageProduct + Offer + AggregateRatingPrice, availability, stars
Local businessLocalBusiness (or subtype)Map pack, hours, phone
RecipeRecipeCook time, calories, rating
EventEventDate, location in SERP
Any pageBreadcrumbListBreadcrumb trail in SERP
Any page with reviewsAggregateRatingStar rating snippet

Minimal schema snippets to provide when missing:

Article:

{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "{title tag text}",
  "author": { "@type": "Person", "name": "{author name}" },
  "datePublished": "{YYYY-MM-DD}",
  "dateModified": "{YYYY-MM-DD}",
  "publisher": {
    "@type": "Organization",
    "name": "{brand name}",
    "logo": { "@type": "ImageObject", "url": "{logo URL}" }
  },
  "image": "{featured image URL}",
  "description": "{meta description}"
}

FAQPage:

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "{Question text}",
      "acceptedAnswer": { "@type": "Answer", "text": "{Answer text}" }
    }
  ]
}

HowTo:

{
  "@context": "https://schema.org",
  "@type": "HowTo",
  "name": "{title}",
  "description": "{brief description}",
  "totalTime": "PT{N}M",
  "step": [
    { "@type": "HowToStep", "name": "{Step 1 name}", "text": "{Step 1 instructions}" }
  ]
}

BreadcrumbList (add to every page):

{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "{homepage URL}" },
    { "@type": "ListItem", "position": 2, "name": "{Category}", "item": "{category URL}" },
    { "@type": "ListItem", "position": 3, "name": "{Page title}", "item": "{page URL}" }
  ]
}

Validate any existing or new schema at: https://validator.schema.org/ or https://search.google.com/test/rich-results

Step 10: Core Web Vitals

Core Web Vitals are Google ranking signals. Measure first; use source inspection only as risk triage.

Thresholds:

MetricGoodNeeds ImprovementPoor
LCP (Largest Contentful Paint)≤ 2.5 s2.5–4.0 s> 4.0 s
INP (Interaction to Next Paint)≤ 200 ms200–500 ms> 500 ms
CLS (Cumulative Layout Shift)≤ 0.10.1–0.25> 0.25

LCP — common causes and fixes:

Check for LCP risk signals in the source:

grep -i "loading=\"lazy\"\|fetchpriority\|preload\|background-image" {file} 2>/dev/null
LCP RiskFix
Hero image has loading="lazy"Remove lazy; add fetchpriority="high"
No <link rel="preload"> for hero imageAdd <link rel="preload" as="image" href="{hero-url}"> in <head>
Hero image is a CSS background-imageMove to <img> tag so browser can discover early
Hero image is large (> 200 KB)Compress + serve WebP/AVIF
Render-blocking scripts before heroMove <script> tags to end of <body> or add defer/async
No server-side cachingEnsure static assets have Cache-Control: max-age=31536000

INP — common causes and fixes:

INP replaces FID as of March 2024. It measures responsiveness to all interactions, not just the first.

INP RiskFix
Heavy JS on main threadCode-split; defer non-critical JS
Long tasks (> 50 ms) blocking threadBreak into smaller tasks with scheduler.yield() or setTimeout
Third-party scripts (chat, analytics, ads)Load async; use Partytown or facade patterns
Unoptimized event handlersDebounce/throttle input handlers

CLS — common causes and fixes:

Check for CLS risk signals:

grep -i "width\|height\|aspect-ratio\|font-display\|@font-face" {file} 2>/dev/null | head -20
CLS RiskFix
Images without explicit width/heightAdd width and height attributes to every <img>
Ads or embeds without reserved spaceSet min-height on ad containers
Web fonts causing FOUT/FOITAdd font-display: swap to @font-face declarations
Dynamically injected bannersReserve space with CSS before injection
Late-loading iframesSet explicit dimensions on <iframe>

CWV assessment for this page:

MetricField valueLab valueSourceStatusRisk signalsConfidence
LCP{value or not_measured}{value or not_measured}PSI/CrUX/GSC/Lighthouse/source{good/needs improvement/poor/not_measured}{signals}{confidence}
INP{value or not_measured}{value or not_measured}PSI/CrUX/GSC/source{status}{signals}{confidence}
CLS{value or not_measured}{value or not_measured}PSI/CrUX/GSC/Lighthouse/source{status}{signals}{confidence}

Measurement tools: PageSpeed Insights (pagespeed.web.dev), Chrome DevTools > Lighthouse, CrUX Dashboard (field data). If none are available, say CWV not measured and list source-risk signals only.

Step 11: Mobile-First Check

Google indexes the mobile version of pages. Fail any of these and rankings are at risk.

grep -i "viewport\|touch-action\|font-size\|min-height\|media" {file} 2>/dev/null | head -30
CheckStatusFinding
Viewport meta tag presentPass/Fail<meta name="viewport" content="width=device-width, initial-scale=1">
No user-scalable=no in viewportPass/Fail{pinch-zoom blocked Y/N}
Body text ≥ 16 pxPass/Fail{base font size found}
Tap targets ≥ 48 × 48 pxPass/Fail{small targets detected Y/N}
No horizontal scroll (content wider than viewport)Pass/Fail{overflow detected Y/N}
Mobile content parity (same content as desktop)Pass/Fail{hidden-via-CSS content detected Y/N}
Interstitials/pop-ups (Google penalty risk)Pass/Fail{detected Y/N}

Key fixes:

  • Missing viewport: add <meta name="viewport" content="width=device-width, initial-scale=1"> to <head>
  • Small tap targets: increase button/link padding so interactive area is at least 48 × 48 px; add min-height: 48px
  • Small text: set html { font-size: 16px } as baseline; never go below 12 px for any body text
  • Content hidden on mobile: avoid display:none on content that only appears on desktop — it won't be indexed
  • Intrusive interstitials: full-screen pop-ups before content loads can trigger a Google penalty; use banners instead

Step 12: Technical Quick Wins

These fixes have high ROI and can be done without content changes.

Canonical tag:

grep -i "canonical" {file} 2>/dev/null
CheckStatusFinding
<link rel="canonical"> presentPass/Fail{URL or missing}
Canonical points to correct self-URLPass/Fail{matches page URL Y/N}
No conflicting canonicals (HTTP vs HTTPS, www vs non-www)Pass/Fail{assessment}

Fix: <link rel="canonical" href="{correct page URL}"> in <head>.

301 redirects:

  • Check if HTTP → HTTPS redirect is in place (if browse available, $B goto "http://{domain}" and confirm redirect)
  • Check if non-www → www (or vice versa) is consistent
  • Identify any redirect chains (A → B → C) and shorten to A → C
  • Flag any 302 (temporary) redirects that should be 301 (permanent)

XML sitemap:

$B goto "{domain}/sitemap.xml"
# confirm 200 response and this page URL is listed
CheckStatusFinding
Sitemap exists at /sitemap.xmlPass/Fail{found Y/N}
This page URL included in sitemapPass/Fail{found Y/N}
Sitemap submitted to Google Search ConsolePass/Fail{assumption — flag for user}
<lastmod> dates are accuratePass/Fail{assessment}

robots.txt:

$B goto "{domain}/robots.txt"
CheckStatusFinding
robots.txt existsPass/Fail{found Y/N}
This page not blocked by DisallowPass/Fail{blocked Y/N}
Sitemap URL referenced in robots.txtPass/Fail{found Y/N}
No wildcard Disallow: / accidentally blocking allPass/Fail{assessment}

Page speed quick wins (no CWV tooling needed):

  • Enable GZIP/Brotli compression on server
  • Set Cache-Control: max-age=31536000, immutable on static assets (JS, CSS, images)
  • Minify HTML, CSS, JS
  • Remove unused CSS (check with DevTools Coverage tab)
  • Preconnect to critical third-party origins: <link rel="preconnect" href="{CDN or font domain}">

Step 13: Compile Checklist

Generate a prioritized fix list plus a machine-readable JSON block:

## SEO Audit: {Page Title or URL}
Primary keyword: {keyword}
Audit date: {date}

### Fix Now (high impact, quick wins)
- [ ] {Fix 1} — {specific action}
- [ ] {Fix 2} — {specific action}

### Fix This Week
- [ ] {Fix 3} — {specific action}
- [ ] {Fix 4} — {specific action}

### Nice to Have
- [ ] {Fix 5} — {specific action}

### Passing Already
- [x] {Element that's already optimized}

```json
{
  "issues": [
    {
      "id": "SEO-001",
      "source": "crawl",
      "observed_value": "",
      "expected_value": "",
      "severity": "high",
      "confidence": "medium",
      "recommendation": "",
      "patch_target": "",
      "verification": "",
      "unresolved_gaps": []
    }
  ]
}

Use AskUserQuestion:
> "Here's the SEO audit. Should I:
> A) Apply the fixes to the local file now
> B) Just save the checklist for me to act on
> C) Apply only the critical fixes"

STOP and wait.

## Completion

Apply selected fixes (if local file). Save the checklist.

Report:
- Page: {title or URL}
- Keyword: {keyword}
- Issues found: {count}
- Critical fixes applied: {count}
- Checklist saved to: {path}

Suggest next steps:
- "Run `/m-repurpose` to create social content from this optimized piece"
- "Run `/m-keywords` to find more keywords to target in new content"
- "Run `/m-brief` to plan the next SEO-optimized content piece"

## Capture Learnings

If you discovered a non-obvious pattern, pitfall, or architectural insight during
this session, log it for future sessions:

```bash
~/.claude/skills/mstack/bin/mstack-learnings-log '{"id":"learn-SHORT_KEY","skill":"m-seo","type":"TYPE","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":N,"source":"SOURCE","scope":"project","evidence":[],"applies_to":["m-seo"],"status":"active","supersedes":[],"files":["path/to/relevant/file"]}'

Types: content, seo, social, ads, audience, operational. Use operational for project environment, CLI, or workflow knowledge.

Sources: observed (you found this in the code), user-stated (user told you), inferred (AI deduction), cross-model (both Claude and Codex agree).

Confidence: 1-10. Be honest. An observed pattern you verified in the code is 8-9. An inference you're not sure about is 4-5. A user preference they explicitly stated is 10.

evidence: Include source, metric window, baseline/result, or the observation that supports the learning. Leave empty only for operational facts.

applies_to: List the mstack skills that should use this learning later.

files: Include the specific file paths this learning references. This enables staleness detection: if those files are later deleted, the learning can be flagged.

Only log genuine discoveries. Don't log obvious things. Don't log things the user already knows. A good test: would this insight save time in a future session? If yes, log it.

Privacy Boundary

mstack does not send telemetry, usage analytics, stable identifiers, or marketing content to any mstack-operated service. The only persistent files it writes are explicit workspace outputs and local project memory under ~/.mstack/.

Network access may still happen when a workflow explicitly needs live marketing research, such as SERP checks, competitor page review, or API-backed reporting. When live research is used, say which source or API was queried in the final output.

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.