Write a Claude skill for driving markfluence
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 0
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 49
Description
Add a Claude skill (a SKILL.md with the usual name/description frontmatter) that teaches Claude how to drive the markfluence CLI, so publishing/reading Confluence pages from markdown in a Claude session is turnkey rather than requiring the model to rediscover flags and conventions each time.
Status
A working skill exists as a user-local file at ~/.claude/skills/markfluence/SKILL.md and is kept current by hand. What is left here is deciding how it ships from this repo — see "Format / location" below. The original body's inventory of commands and flags is preserved below only where it is still true; most of it was rewritten, since the CLI it described no longer exists.
Why
markfluence has grown a fair bit of surface. A skill lets Claude apply it correctly without re-reading the code, and gives a consistent, low-friction UX for "publish these docs" / "pull this page down to edit."
What the skill should cover
The design rule the hand-written one arrived at: cover only what --help cannot, and point at markfluence CMD --help for everything else. Every command carries its reasoning in Long and a worked invocation in Example (enforced by TestSubcommandsDocumentThemselves), and docs/commands/ is generated from that same text, so a skill that restates flags is a third copy that drifts. #102 made the same call for the README. Concretely that leaves credentials, which operations need confirmation, and the handful of behaviours that produce a wrong action if the agent guesses.
- The command inventory, now seventeen rather than five:
create,update,check,diff,page-info,space-info,read,children,find,search,user-find,user-info,attachment-list,attachment-upload,attachment-download,export,schema. - Config & auth:
CONFLUENCE_URL,CONFLUENCE_USERNAME(flag/env/.env),CONFLUENCE_TOKEN(env/.envonly, never a flag), andCONFLUENCE_CLOUD_IDfor a scoped token via the api.atlassian.com gateway; precedence flag > env >.env.user-infowith no argument is the "which account am I?" answer, and a scoped token is the case where one command 401s while every other works —user-findneeds the granularread:content-details:confluence, which #143/#168 measured as implied by nothing. --json, and leaning on it rather than enumerating fields. The output is schema-locked (schema/json-output/v1.json, guarded byinternal/schematest) andmarkfluence schemaprints it with no credentials and no network call, so an agent can parse structurally instead of scraping human output.- Which commands are safe to run unprompted — everything read-only,
checkandschemaincluded — and which need a dry-run-then-confirm. That split is most of the skill's value and none of it is in--help. - Frontmatter:
title,space,parent,page_idlead, then every other key alphabetically — which now includeslabels(#21) andpage_status(#168).page_width∈ narrow/wide/max, andmarkfluence.yamlmay carryspace/page_widthas project settings (#100) and a whole file's metadata in apages:entry (#139), so "the frontmatter" is no longer only the block at the top of the file. - Workflows to encode: publish a new tree; update an existing one; pull a page down to edit (
export→ edit →update);checka drafted file before ever touching the network;diffa file against its page to show a human what a publish would change.
Gotchas worth encoding
The ones that make an agent take the wrong action, not the ones that merely surprise it:
diff's exit codes arediff(1)'s:0identical,1differs,2trouble. Exit 1 is a successful comparison, and an agent that reads it as failure will report the opposite of what happened. Its output is also split across two streams — stdout is the body patch and nothing else, stderr the frontmatter report.updaterefuses a page that moved on since the local copy was made, and that refusal is correct. It is no longer the mtime check the original body described: #149 records what each publish was derived from, so the two checks are a divergence refusal (--forceoverrides) and a body-unchanged skip (attachments, width and labels still run). An agent that reaches for--forceon a refusal is publishing over someone else's work.- There is no
fix. It was removed in #151, and nothing writes an existing file's frontmatter back from its page. Adopting a hand-labeled or hand-resized page ispage-info/readplus an edit;diffis what shows the gap. find's empty result is exit 0, and "no live page with this title" is not "the title is free": an archived page still reserves it, while a folder row is never a clash. The match is exact and case-insensitive, not a substring.page_statusvalues are per page and per account, not per space (#168) — askpage-info PAGE, orspace-info KEYfor the space's list, which a non-admin may only get an approximation of.updatevalidates the name before writing;createcannot, so a misspelled status there is a warning on a page that got created anyway.- A space key, never a numeric space id, and never a valid
PAGE. Use the--spaceflagchildren/export/find/searchtake, orspace-info. parentmay be a page id or a folder id, and nothing records which — opaque and interchangeable.- Conversion is best-effort and lossy in documented ways (guarantees L5/L6), so a round trip will show differences the author did not make.
--debugprints every retry decision with the rate-limit headers (#81), so "it seems to hang" is actionable; a rate-limited request can legitimately take minutes.
Format / location (to decide)
This is the remaining work. The current skill is a hand-maintained file in ~/.claude/skills/, which nothing in this repo ships or tests. Options, from the prior-art comment above:
- A
skills/directory in this repo. - A
.claude-pluginmarketplace entry, the way pchuri/confluence-cli distributes theirs. - A
markfluence install-skillsubcommand — interesting because shell completions already ship this way, generated from the CLI itself in a goreleaserbeforehook. - An
llms.txtat the repo root, cheap and conventional, orthogonal to the above.
Whichever ships, the drift question is the same one docs/commands/ already answers: the parts that can be generated from cobra help should be, and make docs-check's regenerate-and-diff is the pattern to copy if any of it is.
Open questions
- Does the skill assume
markfluenceis on PATH, or include install guidance (from source / Homebrew cask)? - Is a repo-shipped skill tested at all? A skill that names a removed command is worse than no skill, and
fix/infoboth went away while the hand-written one still advertised them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the current user-local ~/.claude/skills/markfluence/SKILL.md and compare its guidance with the command descriptions in docs/commands/. Decide which shipping format from the issue fits the repository, then define how it stays aligned with generated help and make docs-check. Done means the skill is shipped in the chosen location, covers the documented workflows and safety rules, and has a test or check preventing removed commands from returning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100