
Ccf Paper To Exemplar
- 23 installs
- 1.5k repo stars
- Updated July 8, 2026
- mikubaka88/ccfa-skills
Convert conference paper PDFs into distilled writing-exemplar cards (story patterns, section moves, citation-style analysis) for the ccf-paper-writer skill.
About
This skill extracts full text from conference paper PDFs and analyzes writing patterns by venue to produce reusable exemplar cards with story patterns, abstract/introduction/method/evidence moves, and citation-style analysis. A developer uses it to build a personal writing-exemplar library that the ccf-paper-writer skill references as style templates.
- Extracts full PDF text and analyzes writing patterns by venue
- Produces exemplar cards with story patterns and section-level writing moves
Ccf Paper To Exemplar by the numbers
- 23 all-time installs (skills.sh)
- Ranked #982 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mikubaka88/ccfa-skills --skill ccf-paper-to-exemplarAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 23 |
|---|---|
| repo stars | ★ 1.5k |
| Last updated | July 8, 2026 |
| Repository | mikubaka88/ccfa-skills ↗ |
What it does
Convert conference paper PDFs into distilled writing-exemplar cards (story patterns, section moves, citation-style analysis) for the ccf-paper-writer skill.
Files
Paper-to-Exemplar
Purpose
Convert one or more conference paper PDFs into distilled writing exemplar cards that the ccf-paper-writer skill can use as style references. This skill does not write papers. It produces exemplar cards that teach the writer skill how to write.
When To Use
- User says: "use this paper as writing reference", "convert this PDF to exemplar", "add this to my writing templates"
- User wants to build a personal library of favorite papers for writing-style imitation
- User specifies a target venue and wants venue-matched exemplars loaded
- After downloading a best paper, the user wants it distilled for fast reuse
Workflow
1. Receive PDF paths and optional target venue from the user. 2. Run scripts/convert.py to extract text and produce initial cards with [ANALYZE] placeholders. 3. Read the extracted full text (.full.md file) to understand the paper content. 4. Analyze the paper writing patterns:
- Story arc: task -> gap -> root challenge -> insight -> method -> evidence -> limitation
- Abstract moves: what information is packed into each sentence?
- Introduction paragraph roles: what does each paragraph accomplish?
- Method presentation: module-by-module, concept-first, or pipeline-first?
- Evidence organization: table strategy, ablation logic, qualitative placement
- Citation patterns: density, weaving style, author-name usage, grouping
5. Fill in the [ANALYZE] placeholders with concrete, actionable writing-pattern descriptions. 6. Save the completed card to ccf-paper-writer/references/exemplars/cards/. 7. Register the card in ccf-paper-writer/references/exemplars/index.md under the correct venue section. 8. If the user wants this as their default writing template, update ccf-paper-writer/references/custom-format/default-user-format.md. 9. Inform the user the exemplar is ready and what writing patterns it provides.
Venue-Aware Routing
When the user specifies a target venue (e.g., "投CVPR", "for NeurIPS submission"):
1. Classify the target venue into its venue family using ../ccf-paper-writer/references/venue-guides/index.md. 2. If the user provides a PDF, distill it with the venue tag so it is categorized correctly. 3. If the user does NOT provide a PDF but names a venue, check whether exemplar cards already exist for that venue:
- Look in
../ccf-paper-writer/references/exemplars/index.mdfor venue-matched bundles. - If matching exemplars exist, load them and offer them to the writer skill.
- If no matching exemplars exist, suggest: "No {venue} exemplars found. Provide a {venue} best paper PDF and I will distill it."
4. When the writer skill is invoked for this venue, the exemplar index should route to the correct cards automatically.
Integration With ccf-paper-writer
The writer skill loads exemplars through references/exemplars/index.md. This skill populates that index. The handoff is:
paper-to-exemplar (distill PDFs -> create cards -> update index)
-> ccf-paper-writer (load cards from index -> write with venue-matched style)When the writer skill starts, it checks: 1. Did the user specify a venue? If yes, load venue-matched cards. 2. If no venue specified, load the user default cards from custom-format/default-user-format.md. 3. If no default cards exist, load the most general-purpose cards (e.g., llava-4d, vggt).
Output Contract
After processing PDFs:
1. List the generated card files and their locations. 2. Summarize the writing patterns extracted from each paper. 3. State which venue family each card belongs to. 4. If cards were registered as defaults, confirm the registration. 5. Provide next-action options: "Run ccf-paper-writer with these exemplars" or "Add more papers."
Reference Files
scripts/convert.py: PDF-to-markdown extraction and card skeleton generation.../ccf-paper-writer/references/exemplars/index.md: exemplar registry (this skill writes to it).../ccf-paper-writer/references/exemplars/cards/: card storage directory.../ccf-paper-writer/references/custom-format/default-user-format.md: default exemplar configuration.../ccf-paper-writer/references/venue-guides/index.md: venue family classification.
Card Format
Every exemplar card follows this structure (see existing cards for examples):
# Paper Title
Venue/year: CVPR2025.
Source: distilled from PDF by ccf-paper-to-exemplar.
Use when: writing {paper type} in the {venue} venue family.
## Story Pattern
Describe the story arc the paper follows.
## Abstract Moves
How does the abstract compress the contribution?
## Introduction Moves
Paragraph-by-paragraph role analysis.
## Method Moves
How is the method presented and justified?
## Evidence Moves
Evidence types, table/figure strategy, claim mapping.
## Citation Patterns
How are citations woven? Density? Style?
## Reusable Techniques
Transferable writing techniques.
## Do-Not-Copy Boundary
Do not copy specific task, claims, examples, or technical content.Dependencies
- Python3 with
pymupdf(install:pip install pymupdf) - The
convert.pyscript handles PDF text extraction
"""Convert research paper PDFs to distilled markdown exemplar cards.
Usage:
python convert.py paper.pdf --venue CVPR
python convert.py *.pdf --output-dir cards/ --set-default
For each PDF, produces a distilled .md card with writing-pattern analysis.
Pass --full-text to also save the complete extracted text.
"""
import argparse, os, re, sys
from pathlib import Path
def _check_pymupdf():
try:
__import__('pymupdf')
except ImportError:
print('ERROR: pymupdf not installed. Run: pip install pymupdf', file=sys.stderr)
sys.exit(1)
_check_pymupdf()
import pymupdf
def extract_text(pdf_path):
doc = pymupdf.open(pdf_path)
parts = []
for i, page in enumerate(doc,1):
t = page.get_text('text')
if t.strip():
parts.append('## Page ' + str(i) + chr(10) + chr(10) + t)
doc.close()
return chr(10) + chr(10).join(parts)
def clean_text(text):
text = re.sub(r'(?<!' + chr(92) + 'n)' + chr(92) + 'n(?!' + chr(92) + 'n)', ' ', text)
text = re.sub(r'' + chr(92) + 'n{3,}', chr(92) + 'n' + chr(92) + 'n', text)
text = text.replace(chr(0xfb01), 'fi').replace(chr(0xfb02), 'fl')
text = text.replace(chr(0x2013), '--').replace(chr(0x2014), '---')
return text.strip()
def slugify(name):
name = name.lower()
name = re.sub(r'[^a-z0-9]+', '-', name)
return name.strip('-')
def detect_venue(text, user_venue):
if user_venue:
return user_venue.upper()
lower = text[:2000].lower()
for k in ['cvpr','iccv','neurips','iclr','icml','aaai','acl','eccv']:
if k in lower:
return k.upper()
return 'Unknown'
def detect_sections(text):
secs = []
if re.search(r'(?i)abstract', text[:2000]): secs.append('abstract')
if re.search(r'(?i)' + chr(92) + 'bintroduction' + chr(92) + 'b', text): secs.append('introduction')
if re.search(r'(?i)' + chr(92) + 'b(related.work|background)' + chr(92) + 'b', text): secs.append('related work')
if re.search(r'(?i)' + chr(92) + 'b(method|approach|architecture)' + chr(92) + 'b', text): secs.append('method')
if re.search(r'(?i)' + chr(92) + 'b(experiment|evaluation|results)' + chr(92) + 'b', text): secs.append('experiments')
return secs
def make_card(meta):
venue = meta.get('venue','Unknown')
secs = meta.get('sections',[])
out = []
out.append('# ' + meta.get('title', venue + ' Paper'))
out.append('')
out.append('Venue/year: ' + venue + '.')
out.append('Source: distilled from PDF by ccf-paper-to-exemplar skill.')
out.append('Use when: writing in the ' + venue + ' venue family.')
out.append('')
out.append('## Story Pattern')
out.append('')
out.append('[ANALYZE] Describe the story arc: task, gap, insight, method, evidence flow.')
out.append('')
out.append('## Abstract Moves')
out.append('')
out.append('[ANALYZE] How does the abstract compress the contribution?')
out.append('')
out.append('## Introduction Moves')
out.append('')
out.append('[ANALYZE] Paragraph-by-paragraph role analysis of the introduction.')
out.append('')
out.append('## Method Moves')
out.append('')
out.append('[ANALYZE] How is the method presented? Module-by-module or concept-first?')
out.append('')
out.append('## Evidence Moves')
out.append('')
out.append('[ANALYZE] Evidence types, table/figure strategy, claim mapping.')
out.append('')
out.append('## Citation Patterns')
out.append('')
out.append('[ANALYZE] How are citations woven into the text? Density?')
out.append('[ANALYZE] Are citations natural (claim-first) or parenthetical?')
out.append('')
out.append('## Reusable Techniques')
out.append('')
out.append('[ANALYZE] Transferable writing techniques for other papers.')
out.append('')
out.append('## Do-Not-Copy Boundary')
out.append('')
out.append('Do not copy task, claims, examples, or technical content.')
out.append('Only the writing patterns transfer.')
out.append('')
out.append('## Auto-Detected')
out.append('')
out.append('- Sections: ' + (' + '.join(secs) if secs else 'none detected'))
return chr(10).join(out)
def main():
parser = argparse.ArgumentParser(description='Convert PDFs to exemplar cards')
parser.add_argument('pdf', nargs='+', help='PDF files to convert')
parser.add_argument('--venue', help='Target venue, e.g. CVPR, NeurIPS, ICLR')
parser.add_argument('--output-dir', default='.', help='Output directory')
parser.add_argument('--set-default', action='store_true', help='Print default-exemplar registration instructions')
parser.add_argument('--full-text', action='store_true', help='Also save full extracted text')
args = parser.parse_args()
out_dir = Path(args.output_dir)
out_dir.mkdir(parents=True, exist_ok=True)
results = []
for pdf_path in args.pdf:
pdf_file = Path(pdf_path)
if not pdf_file.exists():
print('Not found:', pdf_file)
continue
print('Processing:', pdf_file.name)
try:
text = extract_text(str(pdf_file))
text = clean_text(text)
except Exception as e:
print(' ERROR:', e)
continue
venue = detect_venue(text, args.venue)
secs = detect_sections(text)
meta = {'title': pdf_file.stem, 'venue': venue, 'basename': pdf_file.stem, 'sections': secs}
card = make_card(meta)
slug = slugify(pdf_file.stem)
card_path = out_dir / (slug + '.md')
card_path.write_text(card, encoding='utf-8')
print(' Card ->', card_path)
if args.full_text:
full_path = out_dir / (slug + '.full.md')
full_path.write_text(text, encoding='utf-8')
print(' Full text ->', full_path)
results.append(slug)
print()
print('Done.', len(results), 'PDF(s) processed.')
if args.set_default:
print()
print('=== To register as default writing exemplars ===')
print('1. Copy generated .md card(s) to:')
print(' ccf-paper-writer/references/exemplars/cards/')
print('2. Update index: ccf-paper-writer/references/exemplars/index.md')
print('3. Set as default: ccf-paper-writer/references/custom-format/default-user-format.md')
print()
print('IMPORTANT: Cards contain [ANALYZE] placeholders.')
print('Fill them in by reading the full extracted text.')
if __name__ == '__main__':
main()