본문으로 건너뛰기
cccskills
무료GitHub에 공개

citation-fixer

Audit citations across stored knowledge pages, fix formatting problems, and flag claims without sources. For X posts missing links, use the host's API integration to find matching posts and add verified URLs, with counts of fixes and unresolved gaps.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Audit and fix citation formatting across brain pages. Ensures every fact has an inline [Source: ...] citation matching the standard format. Extended in v0.25.1: scans for broken tweet/post references that lack actual URLs and resolves them via the host's X / Twitter API integration.

연동 도구X (Twitter)
설치 방법 보기

이럴 때 유용합니다

  • Standardizing citation formats across knowledge pages
  • Finding claims that lack sources
  • Restoring missing links to X posts
  • Running recurring citation audits

포함된 파일(2)

  • SKILL.md6.5 KB
  • routing-eval.jsonl585 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Citation Fixer Skill

Convention: see conventions/quality.md for the canonical citation format every fix should match.

Output rule: all links MUST be deterministic (built from API data, not composed by LLM). See _output-rules.md.

Contract

This skill guarantees:

  • Every brain page is scanned for citation compliance.
  • Missing citations are flagged with specific location.
  • Malformed citations are fixed to match the standard format.
  • (v0.25.1) Tweet / post references without URLs are resolved via X API and patched with deterministic https://x.com/<handle>/status/<id> links.
  • Results reported with counts (scanned, fixed, remaining).

Phases

  1. Scan pages. List pages and read each one, checking for inline [Source: ...] citations.
  2. Identify issues:
    • Facts without any citation
    • Citations missing date
    • Citations missing source type
    • Citations with wrong format
    • (v0.25.1) Tweet references without x.com URLs
  3. Fix format issues. Rewrite malformed citations to match conventions/quality.md.
  4. (v0.25.1) Resolve tweet references via the X API integration.
  5. Report results. Count: pages scanned, citations found, issues fixed, tweets resolved, remaining gaps.

Tweet resolution pipeline (v0.25.1 extension)

For each broken tweet reference, follow this chain. The actual API call goes through whatever X integration the host has configured (typical shape: a recipe under recipes/x-api/ with handle / search-all endpoints).

Step 1: Identify broken references

Scan the page for patterns that indicate tweet references without URLs:

  • Contains words like tweeted, posted, said on X, RT, retweet, X post
  • Contains quoted text that looks like a tweet (short, punchy, often starts with a quote)
  • Has [Source: ... X/Twitter ...] without an x.com URL
  • References engagement metrics (likes, impressions) without a link

Step 2: Extract searchable content

From each broken reference, extract:

  • The handle (if mentioned: @<username>)
  • The quoted text (if available)
  • The approximate date (often present in surrounding timeline entries)

Step 3: Search for the actual tweet

Use the host's X API integration. Query patterns:

# Handle + quoted text:
from:<handle> "<exact quote fragment>"

# Quoted text only:
"<exact quote fragment>"

# Original of a retweet:
"<exact quote>" -is:retweet

Step 4: Verify and extract metadata

Once a candidate is found:

  • Confirm the text matches the quoted fragment.
  • Pull the tweet id, author handle, engagement metrics (likes / RTs / impressions).
  • Construct the URL: https://x.com/<handle>/status/<tweet_id>.

Step 5: Patch the brain page

Replace the broken citation with a proper one:

Before:

"<quote fragment>" [Source: <some hand-wavy attribution>]

After:

"<full verified quote>" — <N> likes, <N> RTs, <N> impressions
[Source: [X/<handle>, YYYY-MM-DD](https://x.com/<handle>/status/<tweet_id>)]

Batch mode

When sweeping many pages:

Find candidate pages

# Pages mentioning tweets but with no x.com links
for f in $(find . -name "*.md" -not -path "./node_modules/*"); do
  refs=$(grep -ci "tweet\|posted\|x post\|RT\|retweet\|said on X" "$f")
  links=$(grep -c "x.com/.*/status/" "$f")
  if [ "$refs" -gt 2 ] && [ "$links" -eq 0 ]; then
    echo "$f"
  fi
done

Priority order

  1. Recently created / updated pages — fresh broken refs are easiest to resolve while context is fresh.
  2. High-traffic pages (frequent reads / writes from other skills).
  3. Everything else — bulk cleanup over time.

Rate limiting

  • X API: respect the host's tier limits; don't hammer.
  • Target ~50 pages per batch run.
  • 1-3 API calls per page (search + verify).
  • Batch-commit every 10-20 pages so a partial failure doesn't lose progress.

Output format

Citation Audit Report
=====================
Pages scanned:        N
Citations found:      N
Issues fixed:         N
Tweet links resolved: N
Remaining gaps:       N (pages with uncitable facts)

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • put_page returns revision_conflict mid-batch: re-read that page, re-apply only the citation fix, and continue; never overwrite with the copy you read earlier.
  • get_page returns page_not_found for a cited source: mark the citation unresolvable in the report instead of rewriting it to a guessed slug.
  • A batch commit is interrupted: already-committed pages stay fixed; resume from the last committed page rather than starting over.

Anti-Patterns

  • ❌ Inventing citations for facts that have no source. Flag them.
  • ❌ Removing facts that lack citations (flag them; don't delete).
  • ❌ Fixing citations without reading the full page context.
  • ❌ Batch-fixing without checking quality on a sample first (see conventions/test-before-bulk.md).
  • ❌ Composing tweet URLs by guessing the tweet id. Always go through the X API; deterministic links only.

Integration

This skill can be called:

  • Manually — "fix citations on this page"
  • As a batch cron — weekly sweep of pages with broken refs
  • By other skills — enrich or media-ingest can call citation-fixer before commit to validate output

Metrics

If running as a recurring batch, track state in a small JSON file under ~/.gbrain/citation-fixer-state.json:

{
  "last_run": "2026-04-15T...",
  "pages_scanned": 0,
  "citations_fixed": 0,
  "tweet_links_resolved": 0,
  "citations_unresolvable": 0,
  "pages_remaining": 1424
}

Output Format

The skill's output shape is documented inline in the body sections above (see "Output", "Brain page format", or equivalent). The literal section header here exists for the conformance test (test/skills-conformance.test.ts).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Check research claims cited in books, articles, or conversations by tracing the original paper, methods, underlying data, and independent replication. Save a sourced assessment explaining whether the claim holds up and what remains uncertain.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check a study cited in a book
  • Trace a numerical claim in an article to its source data
  • Verify research evidence before using it in writing
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Explore old files and email archives to rediscover personal writing, ideas, and meaningful conversations. Review selected items one at a time, save worthwhile material as organized notes, and track progress within explicitly permitted folders.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Rediscover old journals and creative writing
  • Find meaningful letters and email conversations
  • Recover past product and business ideas
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Restructure raw article text stored in gbrain into summaries, exact quotes, key insights, and links to related pages. Preserve the original text and connect the article's significance to projects and interests already recorded in gbrain.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Organizing saved articles into readable notes
  • Collecting exact quotes for essays
  • Connecting articles to current projects
garrytan/gbrain3.1만2026년 10월 19일 업데이트

ask-user

무료

Present clear choices when a task needs a human decision, then pause execution until the user replies. This reusable interaction pattern supports filing decisions, priority selection, and confirmation before destructive actions, with an option to decline.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Clarifying requests with several possible meanings
  • Confirming before bulk deletion or overwriting
  • Choosing where to file meeting notes
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Collect public posts across a blog, newsletter, or feed archive and save clean Markdown pages for each article. The workflow avoids duplicates, supports resumed runs, repairs empty results, and hands articles to a separate enrichment skill.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Importing a blog's public article archive
  • Organizing public newsletter posts as knowledge pages
  • Rerunning a feed import without duplicates
garrytan/gbrain3.1만2026년 10월 19일 업데이트

Create a detailed chapter-by-chapter reading companion from an EPUB or PDF, connecting the book’s ideas to experiences and words saved in your personal knowledge store. The result highlights parallels without prescribing actions.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a book’s ideas to personal experiences
  • Review detailed chapter summaries alongside personal reflections
  • Create a parent’s guide for reading a children’s book aloud
garrytan/gbrain3.1만2026년 10월 19일 업데이트

garrytan의 스킬 모두 보기

이 스킬의 문제 신고