agentsclimarketplace

Agentprivacy wiki claude ghost

Skill mitchuski/agentprivacy-skills/agentprivacy-skills-v5/wikis/agentprivacy-wiki-claude-ghost

Privacy-first AI agent skills for Claude Code. 80+ skills and personas for ZKP, decentralized identity, dual-agent architecture, and sovereign AI

Install
npx -y skills add mitchuski/agentprivacy-skills --skill agentprivacy-wiki-claude-ghost

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

A ghost page whose content is written live by Claude via the Anthropic API, inserted between a wiki form submission and the page-JSON response. Activates when building a Claude-authored ghost endpoint, a /claude-ghost FastAPI handler, or live LLM page generation in a fedwiki. Kept by the Librarian 🗃️ in the Tower's Wikis.

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.5 KB, as published. Nobody here has run it

Claude Ghost Skill

A Claude ghost page is a ghost page whose content is written by Claude in response to a user's query. A ghost page appears in the wiki lineup but is never stored on disk. This extends the pattern by inserting the Anthropic API call between the form submission and the page JSON response.

How It Works

  1. User types a topic in an html item form and submits
  2. The wiki POSTs {"query": "..."} to the FastAPI endpoint
  3. FastAPI calls claude-opus-4-8 with a system prompt instructing it to return page JSON
  4. Claude returns a complete wiki page as JSON (title + markdown story items)
  5. FastAPI parses and returns the JSON
  6. The wiki calls wiki.showResult() — the Claude-authored page appears in the lineup

html Item Pattern

Add an html item pointing to the /claude-ghost endpoint:

{
  "type": "html",
  "id": "a1b2c3d4e5f60001",
  "text": "<form action=\"http://api.localhost/claude-ghost\" method=\"POST\">\n  <input name=\"query\" placeholder=\"ask Claude anything…\">\n  <button type=\"submit\">Ask Claude</button>\n</form>"
}

FastAPI Endpoint

import anthropic, json, re

@app.post("/claude-ghost")
def claude_ghost(params: dict):
    query = params.get("query", "").strip() or "wiki"
    client = anthropic.Anthropic()
    message = client.messages.create(
        model="claude-opus-4-8",
        max_tokens=2048,
        thinking={"type": "adaptive"},
        system=(
            "You write federated wiki pages. "
            "Return ONLY valid JSON: "
            '{"title": "...", "story": [{"type": "markdown", "id": "16hexchars", "text": "..."}]}. '
            "Generate 4-6 story items. IDs must be random 16 hex chars. "
            "No prose outside the JSON. No markdown fences."
        ),
        messages=[{"role": "user", "content": f"Write a wiki page about: {query}"}]
    )
    text = next(
        (block.text for block in message.content if hasattr(block, "text")),
        "{}"
    )
    match = re.search(r'\{.*\}', text, re.DOTALL)
    return json.loads(match.group()) if match else {
        "title": f"Claude: {query}",
        "story": [{"type": "markdown", "id": make_id(), "text": f"*No response for: {query}*"}]
    }

Note: Thinking blocks in the response have no .text attribute — the hasattr(block, "text") check skips them and extracts only the text content block.

Page JSON from Claude

Claude is instructed to return only raw JSON — no markdown fences, no prose. The system prompt specifies:

  • title: a short descriptive title
  • story: array of markdown items with random 16-char hex ids
  • 4–6 items covering the topic substantively

The endpoint uses regex to extract the JSON in case Claude wraps it in any extra whitespace.

Requirements

  • anthropic Python package installed (pip install anthropic)
  • ANTHROPIC_API_KEY set in the environment where FastAPI runs
  • Fast Caddy routing api.localhost → FastAPI :8000
  • CORS middleware on FastAPI (allow_origins=["*"])

Related Skills

  • agentprivacy-wiki-ghost-pages — the base ghost page pattern (no Claude)
  • agentprivacy-wiki-page — creating stored pages
  • agentprivacy-wiki-skill-vs-library — when to make the page-structure a deterministic library

Verify: agentprivacy.ai · kept by the Librarian 🗃️ in the Tower's Wikis (the git-less onboarding layer) · model id current as of skill authoring; confirm the latest Claude model when deploying Upstream: skill.fedwiki.club/claude-ghost-skill — vendored + re-framed; not original agentprivacy authorship

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.