hallucinating-labels

将项目分配到一个无法完整放入提示的大型封闭标签词汇表中。先用廉价模型生成可能的标签候选,再通过嵌入模型将这些候选映射到最接近的合法值,确保输出始终落在词汇表范围内。适用于需要将内容匹配到超大分类法或枚举代码列表的场景。

仓库最近推送
GitHub Stars
420
Forks
19
Issues / PRs
20

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "hallucinating-labels":https://skillpi.com/zh/skills/deepskill-14026dfefc625be7ddcb70543719ff0a9b452727179f344252e5dff978ae7100。安装前核对上游来源和版本:https://github.com/oaustegard/claude-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

将项目分配到一个无法完整放入提示的大型封闭标签词汇表中。先用廉价模型生成可能的标签候选,再通过嵌入模型将这些候选映射到最接近的合法值,确保输出始终落在词汇表范围内。适用于需要将内容匹配到超大分类法或枚举代码列表的场景。

0 下载

介绍来源: third_party · oaustegard · 0.1.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: hallucinating-labels
description: >-
  Assign items to a CLOSED label vocabulary that is too large to put in a prompt —
  product taxonomies, category hierarchies, tag vocabularies, routing tables, ICD/SIC-style
  code lists. A cheap model writes the label it thinks the vocabulary would use, and an
  embedder snaps that writing onto the nearest legal value, so the schema is never
  transmitted and the output is always in-vocabulary. Use for "classify these into our
  taxonomy", "tag these against the existing tag list", "map these queries to categories",
  "the enum is too big to send", or a Literal/enum that hits a provider cap. NOT for a
  vocabulary that fits in a prompt — structured output measured 0.701 acc@1 there against
  this pattern's 0.564. NOT for open-ended labelling with no fixed vocabulary, and not for
  ranked retrieval over documents (bm25).
metadata:
  version: 0.1.0

hallucinating-labels

Ask a cheap model to write a plausible label for the item. Snap that label onto the real vocabulary with an embedder. The model never sees the label set.

Doug Turnbull's pattern (softwaredoug.com, 2026-08-10), with the two prompt and boundary corrections that measurement produced.

Check the boundary first

If the whole vocabulary fits in a prompt, do not use this skill. Ship the label list and ask for a constrained choice. Measured on WANDS (860 labels, 468 queries, one gold label each, gemini-3.5-flash-lite):

approach acc@1 acc@3 input tokens/item
structured output, all 860 labels shipped 0.701 0.744 5,265
this skill 0.564 0.690 6
embed the item directly, no model 0.417 0.564 0

Shipping the vocabulary is 14 points more accurate and 880× more expensive. Take the accuracy unless the tokens are the problem. The tokens are the problem when the vocabulary does not fit, when a provider enum cap rejects it, or when per-call cost at volume dominates — a 5,000-label vocabulary is roughly 30k tokens on every single call.

This skill still beats every model-free baseline by a wide margin, so it is the right tool whenever shipping the vocabulary is off the table.

Procedure

1. Write the vocabulary to a file, one label per line, and index it once.

python3 scripts/snap.py build --vocab categories.txt --out .snap-index.pkl

Default backend is tfidf — sklearn only, no download. Pass --backend minilm when sentence-transformers and a ~90 MB download are available and the items share no wording with the labels; it scored 0.564 to tfidf's 0.528 on WANDS. Where items literally contain their own label words, tfidf wins outright (0.416 vs 0.356 on a memory-tag corpus).

2. Write the labels yourself, in batches of 40, using the register prompt below. Write them to a file, one per line, in the same order as the items.

3. Snap.

python3 scripts/snap.py snap --index .snap-index.pkl --labels written.txt --k 3

Add --min-score 0.35 to get null instead of a bad snap, and --items items.txt --union for long items (see below). Output is JSON with the top-k legal labels per item.

4. Report the nulls and the low scores. A snap at cosine 0.18 is noise wearing a legal label. Never present one as a classification.

Anchor the prompt on REGISTER, not on novelty

This is the correction that matters most, and it is the opposite of what the source post's prompt says. Its prompt opens "create a novel, never-seen-before classification". That instruction is safe only with a model too weak to follow it.

Measured on the same 40 WANDS queries, MiniLM backend:

prompt model acc@1 acc@3
embed the query directly, no model — 0.500 0.650
"novel, never-seen-before" gemini-3.5-flash-lite 0.575 0.675
"novel, never-seen-before" Haiku 4.5 subagent 0.100 0.275
register-anchored (below) Haiku 4.5 subagent 0.525 0.750

Haiku obeyed. Asked for novelty it produced novelty — Hydraulic Styling Thrones, Weathered Branch-Frame Reflectors, Chromatic Comfort Accents — and scored a fifth of what doing nothing scores. Gemini flash-lite half-ignored the same instruction and wrote Salon & Styling Chairs, Rustic Wall Mirrors, which is what the snap needs. The pattern wants a novel instance in the vocabulary's register, and "never-seen-before" asks for novel wording. A better instruction-follower is worse at the badly-worded prompt.

The register prompt also beat the novelty prompt on Gemini across all 468 queries (0.564 vs 0.489 acc@1), so it is strictly the better wording. Use this:

You are writing entries for a {DOMAIN} vocabulary.

For each item below, write the label that this vocabulary WOULD file that item under. Write it the way the vocabulary writes labels — match the examples' register, length and wording exactly.

Do not worry about whether the label already exists. Write the obvious one. Do not invent novel or creative wording, do not use marketing adjectives, do not hedge, do not explain.

Examples of the register: {6-8 REAL LABELS FROM THE VOCABULARY}

Output one line per item, in the same order, formatted exactly as: <n>. <label>

ITEMS: {NUMBERED ITEMS}

The examples are load-bearing — they are how the register gets communicated. Draw 6-8 real labels from the vocabulary. They are not the vocabulary; sending eight labels is not sending five thousand.

Batch 40 per call. Never one item per call

Batching is free: 0.496/0.641 batched ×40 against 0.489/0.613 unbatched, at 1/17 the input tokens and 1/9 the wall-clock.

Write the labels yourself when the items are already in context — you are the cheap model here, and it costs one short generation. Delegate to a Haiku subagent only in batches, and only when the item list is long enough to be worth it. A subagent invocation carries a measured floor of ~32,500 tokens before it reads your prompt: a general-purpose Haiku subagent asked to output the single word ok, with zero tool calls, spent 32,539. Per item that floor is 813 tokens at batch 40 and 32,500 at batch 1.

Parse the model's numbered reply back by index, not by zipping positionally. When the model drops item 2 of 40, zipping shifts every later item onto its neighbour's label and nothing signals it. A dropped item is an empty label and then a null.

Long items want --union, not a different pattern

The written label replaces direct embedding cleanly when item and label are the same kind of string — a WANDS query and a WANDS category are both short noun phrases. When the item is a 1,500-character document and the label is one word, the written label throws away most of the document, and the direct embedding still has it. The two are complementary.

Memory store, 1,273 tags, 250 documents of 300-2000 characters, mean 4.8 gold tags, tfidf:

arm @1 @3 @5
embed the document directly 0.416 0.628 0.712
write 5 tags, novelty prompt 0.208 0.352 0.424
write 5 tags, register prompt 0.508 0.700 0.792
both, interleaved (--union) 0.672 0.852 0.888

Note the middle two rows. With the wrong prompt this corpus says the pattern loses to doing nothing by 2x; with the right one it wins, and the union wins by a lot more. Long items amplify the register error rather than causing a separate problem — a distinctive vocabulary is exactly where novel wording lands furthest from anything legal.

Rule: item and label share a register → write labels and snap them. Item is a long document → do that and pass --items ... --union. Neither case is a reason to reach for the novelty prompt.

Picking the encoder, and why there is no local-LLM version

The encoder is the whole system when you cannot reach an API. Snapping the raw query, no model call anywhere, full WANDS set:

encoder int8 ONNX acc@1 acc@3
all-MiniLM-L6-v2 23 MB 0.417 0.564
bge-small-en-v1.5 33 MB 0.427 0.583
gte-small 33 MB 0.455 0.594
bge-base-en-v1.5 109 MB 0.462 0.630

gte-small is the knee. bge-base buys +0.007 acc@1 for 3.3x the download.

Do not substitute a tiny local model for the label-writing half. Pleias Monad (57M) and Baguettotron (321M) both have onnx-community builds — 35 MB and 236 MB at q4f16 — so a wholly client-side pipeline packages fine. Neither earns its bytes. As writers they score 0.425 and 0.400 acc@1 against a 0.500 no-model control on the same 40 queries: they echo the query (smart coffee table → Smart coffee table) and bleed from the few-shot exemplars (chair and a half recliner → Chair & Recycling Bins). As likelihood rerankers over the encoder's top-10 — which asks them for no format compliance at all — they score 0.325 and 0.350 against the same 0.500, with the gold label present in that top-10 for 82.5% of queries.

The reason is the same one that makes the register prompt matter: what the cheap model contributes here is not reasoning but a prior over how taxonomies name things, learned from web-scale pretraining. A small model trained for reasoning has no retail-taxonomy prior, and reasoning does not substitute for one. In a browser, ship the encoder alone.

Failure modes

signal cause fix
Snapped labels are wrong but confident; written labels read like ad copy novelty-anchored prompt, obeyed switch to the register prompt; read the written labels before blaming the snap — Hydraulic Styling Thrones is a prompt bug, not an embedder bug
Everything snaps to the same one or two labels the register examples are unrepresentative, or the vocabulary has one dominant string draw examples spanning the vocabulary's breadth
Scores cluster near 0.15 items and labels share no surface wording --backend minilm, and --union if items are long
Item n onward all shifted by one positional zipping of a reply with a dropped line parse by the emitted index; verify counts match before snapping
Accuracy below the no-model control novelty-anchored prompt, or a long item without --union fix the prompt first — it cost 30 points on one corpus and 7.5 on another; then add --union

Verify it beat doing nothing

Run the no-model control before shipping this anywhere. Snap the items directly (--labels items.txt, no written labels) and compare. On one of the two corpora measured here the control won by 2x under the wrong prompt. If you have no gold labels to score against, hand-check 20 items both ways — the control is one command and its absence is how this pattern gets adopted where it loses.

Related

  • bm25 — ranked retrieval over documents. Different problem: no closed label set.
  • agent-routing — routing to a small named set, which fits in a prompt. Ship it instead.
  • muninn_utils.hypothetical_classifier — the same pattern as a Python API with Gemini wired in, for Muninn sessions.

Experiment, arms and artifacts: oaustegard/experiments/hypothetical-classification.

版本历史

  1. declauding-v0.16.0 GitHub ↗
    原版更新说明

    # declauding declauding is a skill that rewrites prose that reads as model-written into the plain technical prose that a person would have written. Before handing the text back, it checks the rewrite against the draft for any number, name, quotation, hedge or ranking that the edit dropped or added. Install it like any skill in [oaustegard/claude-skills](https://github.com/oaustegard/claude-skills), by copying this directory into the agent's skills folder. The agent then runs it on a draft of prose that someone else will read, and when asked to "declaude", "de-slop" or "humanize" a text. It returns the rewritten text, or, if you ask for the annotated version, an HTML file that marks each edit with the original and the reason for it. ## The register "Register" means the style a piece of prose is written in. [`references/register.md`](references/register.md) catalogues 56 tics that mark prose as model-written. Each entry gives the tell (the surface pattern to look for), why it marks model prose, the fix, and a before-and-after from real text. They fall into five families: | Entries | Family | Example | |---|---|---| | 1–23, 37–42 | **Staging:** the sentence is built so the reader feels a finding arrive instead of being told it | *It is not a wrong answer. It is a non-answer.* | | 24–36 | **Encyclopedic and chatbot:** stock phrasing with nothing staged: inflated verbs, participle tails, forced triads, chatbot sign-offs | *Gallery 825 serves as the exhibition space and boasts 3,000 square feet.* | | 43–47 | **Flat certainty:** an adverb or absolute negative stands in for evidence | *The retry is provably safe.* | | 48–52 | **Confiding essayist:** staging aimed at the reader's trust | *Let's be honest: I won't pretend the first run was clean.* | | 53–56 | **Compressed syntax:** a claim packed into fewer words than a reader can parse | *the others check behaviour the old code never reached* | The staging entries that come up most often: | # | Tic | Example | |---|---|---| | 2 | Negation-first reveal | *It is not a wrong answer. It is a non-answer.* | | 3 | Significance designation | *It is the leg that answers the actual question.* | | 4 | Abstraction agency | *Median hides it.* / *The table shows it.* | | 5 | Deferred noun | *Five of those six rows are one cluster. The sixth is not.* | | 7 | Coy or thesis-shaped header | *What "exhausted" means* / *The one gap that does clear the bar* | | 11 | Straw-man knockdown | *"It thinks twice as long" is the obvious reading, and it is wrong.* | | 12 | Aphoristic closer | *It is the kind of number that looks like evidence and is not.* | | 15 | Fragment cadence | *Six legs. One GPU, one server build, one sampler, one question set.* | | 37 | Dressed metaphor | *That is information loss wearing the costume of a style fix.* | ## Workflow [`SKILL.md`](SKILL.md) has the full procedure. In short: 1. Read the whole draft first, and note where it contradicts itself. 2. State the draft's point in one sentence. If it has none, get one from the author and rebuild around it. 3. Run the linter, then the structural review in a subagent or fresh session that did not write the draft. 4. Ask of each sentence whether it states a finding or stages one, then check headers, paragraph breaks and closers. 5. If the draft describes something that just changed, hand it to a subagent that has not seen the old version, and fix whatever it trips over. 6. Run the preservation diff, and report contradictions to the author instead of fixing them. ## Scripts Run these from the skill's directory. ```sh python3 scripts/declaude_lint.py DRAFT.md --skip-quoted # tells, line by line python3 scripts/declaude_review.py DRAFT.md # headers, openers, closers python3 scripts/declaude_rank.py DRAFT.md --top 15 # most staged sentences first python3 scripts/declaude_diff.py SOURCE.md REWRITE.md # what the edit lost or added python3 scripts/fresh_eyes.py packet README.md # prompt for a newcomer read ``` The linter reads Markdown, plain text and HTML, and needs only the standard library and Python 3.9 or later. It exits 1 when it finds candidates, so it can run as a pre-commit hook. Each hit still needs a reader's judgment, and no regex reaches a staged paragraph or closer, so a clean report does not mean the draft is clean. `--skip-quoted` ignores blockquotes, table rows, code and italic spans, where a document like this one quotes bad prose as examples. The structural review sends only the headers, the opening and closing sentences and any isolated one-line paragraphs to a model: Gemini with `GEMINI_API_KEY`, Claude with `ANTHROPIC_API_KEY`, and with neither it prints the prompt for an agent to answer. The ranker needs torch and transformers. The diff counts constructions rather than words: rewriting "the format that most invites staged reveals" as "more than most formats do" keeps the word *most* and loses the ranking. When adding a lint rule, check that it reports zero on `tests/sample-clean.md`, which is human-written prose. [`references/corpus.md`](references/corpus.md) and [`references/preservation.md`](references/preservation.md) have the measurements behind the diff, the ranker, and the linter's `corpus-register` line, which measures how much of a draft uses the vocabulary of the flat-certainty family. Above about 1.0 per 100 words, read entries 43 to 47. A high score locates the register and does not mean a model wrote the draft. ## Overcorrection Prose stripped of confidence, rhythm and opinion is worse than the tics. The skill keeps certainty that has evidence behind it, first-person judgment, varied sentence length, digression and the author's own habits. It does not compress what remains: a rewrite that is shorter and harder to parse fails entries 53 to 56. A flagged shape sometimes carries a claim, and [`references/exceptions.md`](references/exceptions.md) lists when each one is earned. The rewrite never adds a name, number, date, quote or citation that the source or the author did not supply. When the author provides a sample of their writing, the sample overrides the rules. ## Model profiles [`references/models/`](references/models/) says what drafts from Opus 4.6 to 5.5, Sonnet 4.6 and 5, Haiku 4.5 and Fable 5.1 tend to carry, and how each model goes wrong when it runs the pass itself. ## Sources Entries 1 to 23 come from a register pass on a published benchmark post, and 37 to 42 from passes on drafts and a reference page in this repository. Other families draw on [blader/humanizer](https://github.com/blader/humanizer) and the Wikipedia AI Cleanup project's [Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) (24–36), Louis Abraham's [load-bearing](https://github.com/louisabraham/load-bearing) clusters of pull request descriptions (43–47), Simon Willison's [llm-cliche-highlighter](https://github.com/simonw/tools/blob/main/llm-cliche-highlighter.html) (48–52), and Clark, Martin and Mahowald, [arXiv 2610.29162](https://arxiv.org/abs/2610.29162) (53–56). [`CHANGELOG.md`](CHANGELOG.md) has the history of each addition. Related skills: [challenging](../challenging) runs an adversarial review of a draft's voice and returns findings rather than text; [crafting-instructions](../crafting-instructions) covers prompts, which have a different target register. **Skill folder:** [declauding](https://github.com/oaustegard/claude-skills/tree/main/declauding) --- Release of **declauding** version 0.16.0 ## 📥 Download & Install **[⬇️ Download declauding.zip](https://github.com/oaustegard/claude-skills/releases/download/declauding-v0.16.0/declauding.zip)** To install: 1. Click the download link above (ignore the "Source code" archives below - they're auto-generated by GitHub) 2. Go to [Claude.ai Customize › Skills](https://claude.ai/customize/skills) 3. Upload the downloaded ZIP file 4. Requires paid Claude Pro or Team account See [official documentation](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills) for more details. ## Recent Changes ``` ddc0856 declauding 0.16.0: flag announcing the expected default and abandoned approaches as changelog 8cfff30 docs: Update CHANGELOG.md for released skills ```

  2. transcribing-images-v0.3.1 GitHub ↗
    原版更新说明

    No README found for this skill. **Skill folder:** [transcribing-images](https://github.com/oaustegard/claude-skills/tree/main/transcribing-images) --- Release of **transcribing-images** version 0.3.1 ## 📥 Download & Install **[⬇️ Download transcribing-images.zip](https://github.com/oaustegard/claude-skills/releases/download/transcribing-images-v0.3.1/transcribing-images.zip)** To install: 1. Click the download link above (ignore the "Source code" archives below - they're auto-generated by GitHub) 2. Go to [Claude.ai Customize › Skills](https://claude.ai/customize/skills) 3. Upload the downloaded ZIP file 4. Requires paid Claude Pro or Team account See [official documentation](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills) for more details. ## Recent Changes ``` 2ffc844 transcribing-images 0.3.1: describe the test set, clarify the gemini-3.5-flash name and when to escalate 8cfff30 docs: Update CHANGELOG.md for released skills ```

  3. orchestrating-chat-agents-v1.1.1 GitHub ↗
    原版更新说明

    # orchestrating-chat-agents Orchestrates parallel API instances, delegated sub-tasks, and multi-agent workflows with streaming and tool-enabled delegation patterns. Routes by surface — native subagents in Cowork and Claude Code, httpx fan-out on claude.ai — and covers Gemini delegation via the Cloudflare AI Gateway on every surface. Use for parallel analysis, multi-perspective reviews, or complex task decomposition. In Claude Code, where native subagents exist, which mechanism to launch them with is `dispatching-subagents`; its README maps the neighbouring skills. **Skill folder:** [orchestrating-chat-agents](https://github.com/oaustegard/claude-skills/tree/main/orchestrating-chat-agents) --- Release of **orchestrating-chat-agents** version 1.1.1 ## 📥 Download & Install **[⬇️ Download orchestrating-chat-agents.zip](https://github.com/oaustegard/claude-skills/releases/download/orchestrating-chat-agents-v1.1.1/orchestrating-chat-agents.zip)** To install: 1. Click the download link above (ignore the "Source code" archives below - they're auto-generated by GitHub) 2. Go to [Claude.ai Customize › Skills](https://claude.ai/customize/skills) 3. Upload the downloaded ZIP file 4. Requires paid Claude Pro or Team account See [official documentation](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills) for more details. ## Recent Changes ``` eb1e387 orchestrating-chat-agents 1.1.1: say what minimal and xhigh do on each Gemini model 8cfff30 docs: Update CHANGELOG.md for released skills ```

  4. drawing-video-v1.1.1 GitHub ↗
    原版更新说明

    No README found for this skill. **Skill folder:** [drawing-video](https://github.com/oaustegard/claude-skills/tree/main/drawing-video) --- Release of **drawing-video** version 1.1.1 ## 📥 Download & Install **[⬇️ Download drawing-video.zip](https://github.com/oaustegard/claude-skills/releases/download/drawing-video-v1.1.1/drawing-video.zip)** To install: 1. Click the download link above (ignore the "Source code" archives below - they're auto-generated by GitHub) 2. Go to [Claude.ai Customize › Skills](https://claude.ai/customize/skills) 3. Upload the downloaded ZIP file 4. Requires paid Claude Pro or Team account See [official documentation](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills) for more details. ## Recent Changes ``` 67f47c0 drawing-video 1.1.1: explain why _cf_request needs thinkingLevel low, attribute the 22s clip to the model that ran it 8cfff30 docs: Update CHANGELOG.md for released skills ```

  5. browsing-bluesky-v0.8.1 GitHub ↗
    原版更新说明

    # browsing-bluesky Comprehensive Bluesky browsing via public APIs and real-time firehose. ## Features - **Search posts** - Advanced search with filters (query syntax matching bsky.app) - **User monitoring** - Fetch profiles and recent posts - **Feed/list reading** - Read from custom feeds and curated lists - **Firehose sampling** - Real-time trending topic detection ## Network Requirements This skill requires the following URLs to be whitelisted in your environment: ### API Access - `https://api.bsky.app` - Bluesky public API (search, profiles, feeds) - Used by: `search_posts()`, `get_user_posts()`, `get_profile()`, `get_feed_posts()` ### Firehose Access - `wss://jetstream1.us-east.bsky.network` - Bluesky Jetstream firehose WebSocket - Used by: `sample_firehose()` ### Important Notes - **Do NOT use** `public.api.bsky.app` - This subdomain returns 403 errors from some environments - **Always use** `api.bsky.app` instead - No authentication required for public read operations ## Dependencies ### Python - `requests` - For HTTP API calls ### Node.js (for firehose sampling only) - `ws` - WebSocket client - `https-proxy-agent` - Proxy support Install Node.js dependencies once per session: ```bash cd /home/claude && npm install ws https-proxy-agent ``` ## Installation Add the skill directory to your Python path: ```python import sys sys.path.insert(0, '/path/to/browsing-bluesky') from browsing_bluesky import search_posts, get_user_posts, get_profile, get_feed_posts, sample_firehose ``` ## Usage Examples ### Search Posts ```python # Basic search posts = search_posts("event sourcing", limit=10) # With filters posts = search_posts("MCP", author="austegard.com", since="2025-01-01", limit=20) # Query syntax (like bsky.app advanced search) posts = search_posts('from:acairns.co.uk "event sourcing" lang:en') ``` ### Monitor a User ```python # Get profile profile = get_profile("austegard.com") print(f"{profile['display_name']}: {profile['followers']} followers") # Get recent posts posts = get_user_posts("austegard.com", limit=20) ``` ### Read Feeds and Lists ```python # From URL posts = get_feed_posts("https://bsky.app/profile/austegard.com/lists/3lankcdrlip2f") # From AT-URI posts = get_feed_posts("at://did:plc:xxx/app.bsky.graph.list/xyz") ``` ### Sample Trending Topics ```python # Sample for 30 seconds data = sample_firehose(duration=30) print(f"Top words: {data['topWords'][:10]}") print(f"Trending phrases: {data['topPhrases'][:5]}") print(f"Entities: {data['entities'][:5]}") # Filter for specific term data = sample_firehose(duration=20, filter="python") print(f"Found {data['stats']['totalPosts']} posts about 'python'") ``` ## Return Data Format All API functions return structured dictionaries: **Post objects:** ```python { "uri": "at://...", "text": "Post content", "created_at": "2025-01-01T00:00:00.000Z", "author_handle": "user.bsky.social", "author_name": "Display Name", "likes": 42, "reposts": 10, "replies": 5, "url": "https://bsky.app/profile/user.bsky.social/post/..." } ``` **Profile objects:** ```python { "handle": "user.bsky.social", "display_name": "Display Name", "description": "Bio text", "followers": 100, "following": 50, "posts": 200, "did": "did:plc:..." } ``` **Firehose sample data:** ```python { "window": {"startTime": "...", "endTime": "...", "durationSeconds": 30}, "stats": {"totalReceived": 1000, "totalPosts": 500, "postsPerSecond": 16.7}, "topWords": [["word", count], ...], "topPhrases": [["phrase", count], ...], "entities": [["Named Entity", count], ...], "samplePosts": [{"text": "...", "altTexts": [...], "hasImages": true}, ...] } ``` ## Troubleshooting ### 403 Errors from API - Ensure you're using `api.bsky.app` not `public.api.bsky.app` - Verify `api.bsky.app` is whitelisted in your environment ### Firehose Sampling Fails - Check Node.js dependencies are installed: `npm list ws https-proxy-agent` - Verify `jetstream1.us-east.bsky.network` WebSocket access is allowed - If behind a proxy, ensure `https_proxy` environment variable is set ### Module Import Errors - Directory name has hyphens (`browsing-bluesky`) but module uses underscores (`browsing_bluesky`) - Use `importlib.util.spec_from_file_location()` if standard import fails ## Related Skills This skill consolidates and replaces: - `sampling-bluesky-zeitgeist` (deprecated) - Firehose sampling now built-in ## Version 0.5.0 **Skill folder:** [browsing-bluesky](https://github.com/oaustegard/claude-skills/tree/main/browsing-bluesky) --- Release of **browsing-bluesky** version 0.8.1 ## 📥 Download & Install **[⬇️ Download browsing-bluesky.zip](https://github.com/oaustegard/claude-skills/releases/download/browsing-bluesky-v0.8.1/browsing-bluesky.zip)** To install: 1. Click the download link above (ignore the "Source code" archives below - they're auto-generated by GitHub) 2. Go to [Claude.ai Customize › Skills](https://claude.ai/customize/skills) 3. Upload the downloaded ZIP file 4. Requires paid Claude Pro or Team account See [official documentation](https://support.claude.com/en/articles/12512198-how-to-create-custom-skills) for more details. ## Recent Changes ``` afce24d browsing-bluesky 0.8.1: split transcription empirics by test set, define token recall, say what gemini-3.5-flash runs 8cfff30 docs: Update CHANGELOG.md for released skills ```

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.1.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 解决大规模封闭标签分类的核心工程问题,适用于产品分类法、ICD/SIC代码等真实业务场景
  • 提供详实的性能基准数据(WANDS数据集acc@1=0.564 vs 结构化输出0.701)
  • 明确界定适用边界:仅当词汇表无法放入提示时使用
触发精准85/100

待提升项

  • description错位 原报告严重程度:轻微

    顶层frontmatter中description字段为空,实质性描述内容位于skill_body内部

    改进建议:将description内容移至顶层frontmatter字段

亮点

  • 覆盖多种典型使用场景的触发词变体(classify/taxonomy, tag/list, map/categories)
  • 明确排除不适用场景(可放入提示的词汇表、开放式标注、BM25检索)
结构规范90/100

待提升项

  • 缺少显式章节标题 原报告严重程度:轻微

    When to Use相关内容存在但未使用标准章节标题标注

    改进建议:添加显式的## When to Use章节标题以提升可读性

亮点

  • 执行流程分阶段清晰(Check boundary -> Procedure -> Anchor prompt -> Batch处理)
  • 提供完整的端到端命令行示例(build/snap命令)
  • 包含失败模式诊断表和修复方案
执行可靠88/100

亮点

  • 工具链明确(sklearn/tfidf或sentence-transformers/minilm)
  • 关键参数有实测依据(--min-score 0.35基于cosine相似度阈值)
  • 覆盖主要异常场景(空值返回null、索引错位检测、长文档union模式)
  • 强调验证控制组的重要性(建议先运行no-model baseline)
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • softwaredoug.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。