원클릭으로
rrwrite-extract-figures-tables
Extract figures and tables from analyzed repository and generate supplementary visualizations
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Extract figures and tables from analyzed repository and generate supplementary visualizations
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate publication-quality plots from data files or DataFrames
Analyzes a GitHub repository or local directory to extract structure, files, and research context
Assembles all manuscript sections into a complete manuscript with validation and metadata generation
Analyzes manuscript outline for journal suitability, recommends optimal journal, and fetches author guidelines
Performs adversarial critique of manuscripts, outlines, literature reviews, or other academic content against journal requirements and quality standards.
Analyzes the repository structure and generates a detailed manuscript outline based on target journal guidelines (Nature, PLOS, Bioinformatics).
| name | rrwrite-extract-figures-tables |
| description | Extract figures and tables from analyzed repository and generate supplementary visualizations |
| allowed_tools | ["Read","Write","Bash","Glob","Grep"] |
| fork_mode | fork |
Extract existing figures/tables from the analyzed repository and generate supplementary analysis visualizations. Creates manifests with priority metadata.
This skill performs two extraction tasks:
Before running this skill, ensure:
/rrwrite-analyze-repository)data_tables/ directory exists with analysis outputsRequired arguments:
--target_dir: Manuscript output directory (e.g., manuscript/project_v1)--repo_path: Path to analyzed repositoryOptional arguments:
--extract: What to extract: figures, tables, or figures,tables (default: both)--generate: What to generate: figures, tables, or figures,tables (default: both)# Run extraction
python scripts/rrwrite-extract-figures-tables.py \
--repo-path {repo_path} \
--manuscript-dir {target_dir} \
--extract figures,tables \
--generate figures \
--verbose
Creates the following directory structure:
{target_dir}/
├── figures/
│ ├── from_repo/ # Priority 1: Original repository figures
│ │ ├── workflow_diagram.pdf
│ │ ├── results_plot.png
│ │ └── README.md # Auto-generated index
│ ├── generated/ # Priority 2: Analysis visualizations
│ │ ├── repository_composition.png
│ │ ├── repository_composition.pdf
│ │ ├── file_size_distribution.png
│ │ └── research_topics.png
│ └── figure_manifest.json # Metadata with priorities
├── tables/
│ ├── from_repo/ # Priority 1: Original data tables
│ │ ├── experimental_data.csv
│ │ └── benchmark_results.tsv
│ ├── generated/ # Priority 2: Analysis tables
│ │ ├── repository_statistics.tsv
│ │ └── file_inventory.tsv
│ └── table_manifest.json
figures/figure_manifest.json){
"version": "1.0",
"created_at": "2025-01-15T10:30:00",
"total_figures": 8,
"figures_from_repo": 5,
"figures_generated": 3,
"figures": [
{
"id": "fig_repo_001",
"path": "figures/from_repo/workflow_diagram.pdf",
"source": "from_repo",
"priority": 1,
"original_path": "docs/figures/workflow.pdf",
"recommended_sections": ["methods", "introduction"],
"default_caption": "Workflow diagram showing analysis pipeline",
"generating_script": "scripts/create_workflow.py"
},
{
"id": "fig_gen_001",
"path": "figures/generated/repository_composition.png",
"source": "generated",
"priority": 2,
"recommended_sections": ["methods", "results"],
"default_caption": "Repository composition by file category"
}
]
}
Updates StateManager with extraction results:
from pathlib import Path
import sys
sys.path.insert(0, 'scripts')
from rrwrite_state_manager import StateManager
state = StateManager(output_dir="{target_dir}")
# Mark stage as in-progress
state.update_stage("figure_table_extraction", "in_progress")
# After extraction, mark as completed
state.update_figure_table_extraction(
figures_from_repo=5,
figures_generated=3,
tables_from_repo=2,
tables_generated=4,
figure_manifest_path="figures/figure_manifest.json",
table_manifest_path="tables/table_manifest.json",
scripts_parsed=12
)
After extraction, validate manifests:
# Validate against schema
python scripts/rrwrite_manifest_generator.py \
--manuscript-dir {target_dir} \
--validate \
--schemas-dir schemas
When drafting sections, query manifests for available figures:
from pathlib import Path
from rrwrite_manifest_generator import ManifestGenerator
generator = ManifestGenerator(Path("{target_dir}"))
# Get figures for specific section (prioritizes repo figures)
results_figures = generator.get_figures_for_section("results")
for fig in results_figures:
print(f"Priority {fig['priority']}: {fig['path']}")
print(f"Caption: {fig['default_caption']}")
The extractor automatically excludes:
*thumb*, *icon*, *logo*, *badge*)build/, dist/, node_modules/, __pycache__/).git/, .ipynb_checkpoints/)Cause: Repository may not contain figure files or extraction patterns don't match
Solution: Check repository for figure files manually:
find {repo_path} -name "*.png" -o -name "*.pdf" -o -name "*.svg"
Cause: Repository analysis didn't create data_tables/ directory
Solution: Re-run repository analysis:
/rrwrite-analyze-repository --repo_path {repo_path} --output_dir {target_dir}
Cause: Schema files missing or malformed manifest
Solution: Check schemas exist in schemas/ directory:
ls schemas/figure_manifest_schema.json
ls schemas/table_manifest_schema.json
This stage runs after research and before drafting:
data_tables/After successful extraction:
figures/from_repo/README.md to verify detected figures/rrwrite-draft-section --section introduction✓ Figures extracted and copied to figures/from_repo/
✓ Generated figures created in figures/generated/
✓ Tables extracted to tables/from_repo/
✓ Manifests created with valid JSON schema
✓ StateManager updated with extraction counts
✓ Priority metadata correctly assigned (1=repo, 2=generated)