Skip to content

zlsjtj/FigureCraft

scientific-figure-studio

Unverified

FigureCraft 根据科学对象、关系和数据制作科研图与语义配色。适用于机制、硬件、分层材料、定量图及整套配图,交付可编辑图源和分别记录的技术、科学与视觉审阅,保留数值、拓扑和修改范围。

FileKindSize
SKILL.mdskill md8.5 KB
agents/openai.yamlconfig601 B
assets/reference_palettes.jsonconfig11.6 KB
examples/aperture-focus-demo/README.mdmarkdown3.1 KB
examples/aperture-focus-demo/audit/label-load.jsonconfig988 B
examples/aperture-focus-demo/audit/portable-rebuild.jsonconfig1.1 KB
examples/aperture-focus-demo/audit/review-scope.jsonconfig750 B
examples/aperture-focus-demo/audit/semantic-checks.jsonconfig1.5 KB
examples/aperture-focus-demo/brief.mdmarkdown1.4 KB
examples/aperture-focus-demo/caption.mdmarkdown765 B
examples/aperture-focus-demo/exports/baseline/figure.pdfbinary41.1 KB
examples/aperture-focus-demo/exports/baseline/figure.pngbinary47.7 KB
examples/aperture-focus-demo/exports/baseline/figure.svgother3.6 KB
examples/aperture-focus-demo/exports/final/figure.pdfbinary72.4 KB
examples/aperture-focus-demo/exports/final/figure.pngbinary28.0 KB
examples/aperture-focus-demo/exports/final/figure.svgother3.8 KB
examples/aperture-focus-demo/exports/final/figure_deuteranomaly100.pngbinary29.0 KB
examples/aperture-focus-demo/exports/final/figure_grayscale.pngbinary27.4 KB
examples/aperture-focus-demo/exports/first/figure.pdfbinary72.5 KB
examples/aperture-focus-demo/exports/first/figure.pngbinary46.8 KB
examples/aperture-focus-demo/exports/first/figure.svgother4.3 KB
examples/aperture-focus-demo/figure_spec.jsonconfig2.9 KB
examples/aperture-focus-demo/manifest.sha256.jsonconfig2.6 KB
examples/aperture-focus-demo/requirements.txtmanifest61 B
examples/aperture-focus-demo/review.mdmarkdown3.2 KB
examples/aperture-focus-demo/scripts/audit.pyscript3.3 KB
examples/aperture-focus-demo/scripts/rebuild.pyscript10.8 KB
examples/aperture-focus-demo/source/baseline.jsonconfig149 B
examples/aperture-focus-demo/source/final.jsonconfig895 B
examples/aperture-focus-demo/source/first.jsonconfig1.2 KB
examples/assembled-cutaway/README.mdmarkdown3.4 KB
examples/assembled-cutaway/author_geometry.pyscript9.2 KB
examples/assembled-cutaway/author_interface.pyscript8.5 KB
examples/assembled-cutaway/build.pyscript1.7 KB
examples/assembled-cutaway/development-review.jsonconfig1.6 KB
examples/assembled-cutaway/input/implementation.mdmarkdown2.1 KB
examples/assembled-cutaway/scenes/alternative.jsonconfig24.1 KB
examples/assembled-cutaway/scenes/first.jsonconfig21.3 KB
examples/assembled-cutaway/scenes/object-view.jsonconfig25.3 KB
examples/assembled-cutaway/scenes/selected.jsonconfig38.1 KB
examples/assembled-cutaway/views/alternative/figure.pdfbinary42.5 KB
examples/assembled-cutaway/views/alternative/figure.pngbinary86.5 KB
examples/assembled-cutaway/views/alternative/figure.svgother15.1 KB
examples/assembled-cutaway/views/first/figure.pdfbinary42.3 KB
examples/assembled-cutaway/views/first/figure.pngbinary84.6 KB
examples/assembled-cutaway/views/first/figure.svgother13.0 KB
examples/assembled-cutaway/views/object-view/alt.txtmarkdown521 B
examples/assembled-cutaway/views/object-view/caption.txtmarkdown435 B
examples/assembled-cutaway/views/object-view/figure.pdfbinary42.6 KB
examples/assembled-cutaway/views/object-view/figure.pngbinary81.9 KB
examples/assembled-cutaway/views/object-view/figure.svgother14.9 KB
examples/assembled-cutaway/views/object-view/qa-deuteranopia.pngbinary107.8 KB
examples/assembled-cutaway/views/object-view/qa-grayscale.pngbinary98.4 KB
examples/assembled-cutaway/views/selected/alt.txtmarkdown635 B
examples/assembled-cutaway/views/selected/caption.txtmarkdown501 B
examples/assembled-cutaway/views/selected/figure.pdfbinary43.7 KB
examples/assembled-cutaway/views/selected/figure.pngbinary84.4 KB
examples/assembled-cutaway/views/selected/figure.svgother23.4 KB
examples/assembled-cutaway/views/selected/qa-deuteranopia.pngbinary137.8 KB
examples/assembled-cutaway/views/selected/qa-grayscale.pngbinary123.4 KB
examples/bin-latch/README.mdmarkdown2.8 KB
examples/bin-latch/alt_text.txtmarkdown574 B
examples/bin-latch/build_figure.pyscript13.7 KB
examples/bin-latch/caption.txtmarkdown654 B
examples/bin-latch/comparison/new/final/figure.pngbinary107.9 KB
examples/bin-latch/comparison/new/final/figure.svgother9.4 KB
examples/bin-latch/comparison/new/final/manuscript.mdmarkdown9.9 KB
examples/bin-latch/comparison/new/first/figure.pngbinary108.1 KB
examples/bin-latch/comparison/new/first/figure.svgother9.4 KB
examples/bin-latch/comparison/new/first/manuscript.mdmarkdown9.9 KB
examples/bin-latch/comparison/old/final/figure.pngbinary115.3 KB
examples/bin-latch/comparison/old/final/figure.svgother8.1 KB
examples/bin-latch/comparison/old/final/figure/figure.pngbinary115.3 KB
examples/bin-latch/comparison/old/final/manuscript.mdmarkdown9.4 KB
examples/bin-latch/comparison/old/first/figure.pngbinary118.9 KB
examples/bin-latch/comparison/old/first/figure.svgother8.2 KB
examples/bin-latch/comparison/old/first/figure/figure.pngbinary118.9 KB
examples/bin-latch/comparison/old/first/manuscript.mdmarkdown9.4 KB
examples/bin-latch/comparison/plain/final/figure.pngbinary149.9 KB
examples/bin-latch/comparison/plain/final/figure.svgother8.4 KB
examples/bin-latch/comparison/plain/final/manuscript.mdmarkdown10.0 KB
examples/bin-latch/comparison/plain/final/mechanism.svgother8.4 KB
examples/bin-latch/comparison/plain/first/figure.pngbinary149.8 KB
examples/bin-latch/comparison/plain/first/figure.svgother8.4 KB
examples/bin-latch/comparison/plain/first/manuscript.mdmarkdown10.0 KB
examples/bin-latch/comparison/plain/first/mechanism.svgother8.4 KB
examples/bin-latch/figure.pdfbinary126.9 KB
examples/bin-latch/figure.pngbinary112.8 KB
examples/bin-latch/figure.svgother10.7 KB
examples/bin-latch/figure_deuteranopia.pngbinary113.6 KB
examples/bin-latch/figure_grayscale.pngbinary54.4 KB
examples/bin-latch/figure_spec.jsonconfig19.4 KB
examples/bin-latch/input/draft.mdmarkdown6.4 KB
examples/bin-latch/input/implementation_notes.mdmarkdown8.7 KB
examples/bin-latch/input/results.csvother677 B
examples/bin-latch/input/sources_and_limits.mdmarkdown5.6 KB
examples/bin-latch/input/task.mdmarkdown2.8 KB
examples/bin-latch/manuscript.mdmarkdown9.9 KB
examples/bin-latch/requirements.txtmanifest46 B
examples/bin-latch/results.csvother677 B
examples/bin-latch/review-first-look.mdmarkdown7.5 KB
examples/bin-latch/review-followup.mdmarkdown2.3 KB
examples/bin-latch/review-review.mdmarkdown12.8 KB
examples/cable-window/README.mdmarkdown2.4 KB
examples/cable-window/after/figure.pdfbinary44.0 KB
examples/cable-window/after/figure.pngbinary75.1 KB
examples/cable-window/after/figure.svgother8.8 KB
examples/cable-window/before/figure.pdfbinary41.8 KB
examples/cable-window/before/figure.pngbinary100.8 KB
examples/cable-window/before/figure.svgother8.1 KB
examples/cable-window/brief.jsonconfig1.3 KB
examples/cable-window/build_cable_demo.pyscript14.7 KB
examples/cable-window/caption-and-alt.mdmarkdown826 B
examples/cable-window/method-after.mdmarkdown684 B
examples/cable-window/method-before.mdmarkdown717 B
examples/co-wound-editorial/README.mdmarkdown3.7 KB
examples/co-wound-editorial/body.txtmarkdown286 B
examples/co-wound-editorial/build_figure.pyscript7.5 KB
examples/co-wound-editorial/candidates/diagonal-first.pngbinary113.7 KB
examples/co-wound-editorial/candidates/upright.pngbinary102.5 KB
examples/co-wound-editorial/document/clean.docxbinary139.9 KB
examples/co-wound-editorial/document/clean.jsonconfig416 B
examples/co-wound-editorial/document/clean.pdfbinary115.1 KB
examples/co-wound-editorial/document/page-1.pngbinary238.6 KB
examples/co-wound-editorial/selected/alt.txtmarkdown138 B
examples/co-wound-editorial/selected/assembly-roles.pngbinary11.1 KB
examples/co-wound-editorial/selected/assembly.pngbinary125.1 KB
examples/co-wound-editorial/selected/caption.txtmarkdown390 B
examples/co-wound-editorial/selected/detail-roles.pngbinary3.2 KB
examples/co-wound-editorial/selected/detail.pngbinary21.2 KB
examples/co-wound-editorial/selected/deuteranopia-approx.pngbinary107.3 KB
examples/co-wound-editorial/selected/figure.pdfbinary236.1 KB
examples/co-wound-editorial/selected/figure.pngbinary107.4 KB
examples/co-wound-editorial/selected/figure.svgother197.3 KB
examples/co-wound-editorial/selected/grayscale.pngbinary46.8 KB
examples/co-wound-editorial/selected/record.jsonconfig149.3 KB
examples/co-wound-editorial/validation.jsonconfig1.5 KB
examples/co-wound-laminate/README.mdmarkdown3.6 KB
examples/co-wound-laminate/body.txtmarkdown286 B
examples/co-wound-laminate/build_document.pyscript2.5 KB
examples/co-wound-laminate/build_laminate.pyscript9.6 KB
examples/co-wound-laminate/build_laminate_first.pyscript9.6 KB
examples/co-wound-laminate/caption-before.txtmarkdown231 B
examples/co-wound-laminate/caption.txtmarkdown425 B
examples/co-wound-laminate/continuous-v2/assembly-roles.pngbinary9.4 KB
examples/co-wound-laminate/continuous-v2/assembly.pngbinary114.5 KB
examples/co-wound-laminate/continuous-v2/deuteranopia-approx.pngbinary68.3 KB
examples/co-wound-laminate/continuous-v2/figure.pdfbinary193.4 KB
examples/co-wound-laminate/continuous-v2/figure.pngbinary67.3 KB
examples/co-wound-laminate/continuous-v2/figure.svgother157.0 KB
examples/co-wound-laminate/continuous-v2/grayscale.pngbinary30.5 KB
examples/co-wound-laminate/continuous-v2/record.jsonconfig147.5 KB
examples/co-wound-laminate/continuous-v2/tail-detail-roles.pngbinary1022 B
examples/co-wound-laminate/continuous-v2/tail-detail.pngbinary2.2 KB
examples/co-wound-laminate/document/before.docxbinary112.5 KB
examples/co-wound-laminate/document/before.pdfbinary91.5 KB
examples/co-wound-laminate/document/clean.docxbinary102.3 KB
examples/co-wound-laminate/document/clean.pdfbinary89.2 KB
examples/co-wound-laminate/document/review.docxbinary102.3 KB
examples/co-wound-laminate/document/review.pdfbinary89.3 KB
examples/co-wound-laminate/first-continuous/assembly-roles.pngbinary9.6 KB
examples/co-wound-laminate/first-continuous/assembly.pngbinary116.2 KB
examples/co-wound-laminate/first-continuous/deuteranopia-approx.pngbinary80.4 KB
examples/co-wound-laminate/first-continuous/figure.pdfbinary219.0 KB
examples/co-wound-laminate/first-continuous/figure.pngbinary78.6 KB
examples/co-wound-laminate/first-continuous/figure.svgother187.2 KB
examples/co-wound-laminate/first-continuous/grayscale.pngbinary34.3 KB
examples/co-wound-laminate/first-continuous/record.jsonconfig148.8 KB
examples/co-wound-laminate/first-continuous/tail-detail-roles.pngbinary4.2 KB
examples/co-wound-laminate/first-continuous/tail-detail.pngbinary22.8 KB
examples/co-wound-laminate/input.mdmarkdown1.3 KB
examples/co-wound-laminate/section-v2/assembly-roles.pngbinary9.4 KB
examples/co-wound-laminate/section-v2/assembly.pngbinary114.5 KB
examples/co-wound-laminate/section-v2/deuteranopia-approx.pngbinary81.1 KB
examples/co-wound-laminate/section-v2/figure.pdfbinary203.5 KB
examples/co-wound-laminate/section-v2/figure.pngbinary80.0 KB
examples/co-wound-laminate/section-v2/figure.svgother211.4 KB
examples/co-wound-laminate/section-v2/grayscale.pngbinary37.1 KB
examples/co-wound-laminate/section-v2/record.jsonconfig75.5 KB
examples/co-wound-laminate/selected/assembly-roles.pngbinary9.4 KB
examples/co-wound-laminate/selected/assembly.pngbinary114.5 KB
examples/co-wound-laminate/selected/deuteranopia-approx.pngbinary69.2 KB
examples/co-wound-laminate/selected/figure.pdfbinary193.4 KB
examples/co-wound-laminate/selected/figure.pngbinary68.1 KB
examples/co-wound-laminate/selected/figure.svgother157.3 KB
examples/co-wound-laminate/selected/grayscale.pngbinary30.8 KB
examples/co-wound-laminate/selected/record.jsonconfig147.5 KB
examples/co-wound-laminate/selected/tail-detail-roles.pngbinary1022 B
examples/co-wound-laminate/selected/tail-detail.pngbinary2.2 KB
examples/common-reference-demo/README.mdmarkdown2.3 KB
examples/common-reference-demo/alternative/build.pyscript7.4 KB
examples/common-reference-demo/alternative/caption.txtmarkdown453 B
examples/common-reference-demo/alternative/figure.pdfbinary72.6 KB
examples/common-reference-demo/alternative/figure.pngbinary39.9 KB
examples/common-reference-demo/alternative/figure.svgother8.0 KB
examples/common-reference-demo/alternative/figure_spec.jsonconfig17.0 KB
examples/common-reference-demo/caption.txtmarkdown569 B
examples/common-reference-demo/dev/REVIEW.mdmarkdown1.8 KB
examples/common-reference-demo/dev/attempt-01/rows.jsonconfig28.2 KB
examples/common-reference-demo/dev/attempt-01/rows/caption.txtmarkdown529 B

examples/aperture-focus-demo/scripts/audit.py

View on GitHub
"""Bounded checks on the actual exported SVG/PDF, never a human-readability test."""
import argparse, hashlib, json, math, re
from pathlib import Path
from xml.etree import ElementTree as ET
from pypdf import PdfReader

def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest()
def main():
    ap=argparse.ArgumentParser();ap.add_argument('--figure-dir',type=Path,required=True);ap.add_argument('--out',type=Path,required=True);a=ap.parse_args()
    if a.out.exists():raise FileExistsError(a.out)
    root=a.figure_dir; svg=root/'figure.svg'; tree=ET.parse(svg);elems=list(tree.getroot());byid={e.get('id'):e for e in elems if e.get('id')}; circles=[e for e in elems if e.tag.endswith('}circle')]
    b=byid['disk-B'];ad=byid['disk-A'];upper=byid['barrier-upper'];lower=byid['barrier-lower'];f=lambda e,k:float(e.get(k));top=f(upper,'y')+f(upper,'height');bottom=f(lower,'y');wall=f(upper,'x');u=10
    checks={
      'exact_circle_count_2':len(circles)==2,
      'identities_exactly_A_B':{e.get('data-logical-id') for e in circles}=={'A','B'},
      'all_circles_primary':all(e.get('data-object-part')=='primary' for e in circles),
      'A_diameter_2':abs(2*f(ad,'r')/u-2)<1e-10,
      'B_diameter_4':abs(2*f(b,'r')/u-4)<1e-10,
      'opening_3':abs((bottom-top)/u-3)<1e-10,
      'shared_centerline':f(b,'cy')==f(ad,'cy')==(top+bottom)/2,
      'single_shared_wall_ID':upper.get('data-logical-id')==lower.get('data-logical-id')=='wall',
      'A_right_of_wall':f(ad,'cx')-f(ad,'r')>wall+f(upper,'width'),
      'B_center_left_of_wall':f(b,'cx')<wall,
      'B_touches_both_corners':all(abs(math.hypot(wall-f(b,'cx'),y-f(b,'cy'))-f(b,'r'))<1e-10 for y in [top,bottom]),
      'no_ghosts_or_extra_disks':len(circles)==2 and len([e for e in elems if e.tag.endswith('}ellipse')])==0,
      'dimensions_160_by_84':tree.getroot().get('width')=='160mm' and tree.getroot().get('height')=='84mm'
    }
    for prefix in ['B-approach','A-through']:
        arrow=byid[prefix+'-head'];pts=[tuple(map(float,p.split(','))) for p in arrow.get('points').split()]
        checks[prefix+'_rightward']=pts[0][0]>sum(p[0] for p in pts[1:])/2 and abs(pts[0][1]-(top+bottom)/2)<1e-10
    content=PdfReader(root/'figure.pdf').pages[0].get_contents().get_data()
    fonts=[float(v) for v in re.findall(rb'/[^\s/]+\s+([0-9.]+)\s+Tf',content)]
    checks['pdf_min_font_at_least_10pt']=bool(fonts) and min(fonts)>=10
    # This is re-evaluation of the stated deterministic rule, not benchmark data.
    cases=[{'d':d,'result':'pass' if d<3 else 'block','evidence':'constructed rule check'} for d in [2,2.5,3,4]]
    checks['four_constructed_checks']=[v['result'] for v in cases]==['pass','pass','block','block']
    result={'source_svg_sha256':sha(svg),'source_pdf_sha256':sha(root/'figure.pdf'),'checks':checks,'constructed_checks':cases,'minimum_pdf_tf_pt':min(fonts),'status':'PASS' if all(checks.values()) else 'FAIL','scope':'Actual SVG primitives and decoded PDF stream. Geometrically constructed tangent B placement, no dynamics or forces. Does not certify visual quality. Uses independent arithmetic, not FigureCraft scene engine.'}
    a.out.write_text(json.dumps(result,ensure_ascii=False,indent=2),encoding='utf-8');print(json.dumps({'status':result['status'],'checks':len(checks)}))
    return 0 if all(checks.values()) else 1
if __name__=='__main__':raise SystemExit(main())
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall