Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add bastien-gallay/rhetorical-analysis-skill
Or install specific skill: npx add-skill https://github.com/bastien-gallay/rhetorical-analysis-skill
# Description
Analyse rhétorique et épistémologique d'articles, discours et textes argumentatifs. Utiliser ce skill quand l'utilisateur demande d'analyser la qualité argumentative d'un texte, d'identifier des sophismes ou biais, d'évaluer la fiabilité des sources citées, de déconstruire la logique d'un raisonnement, ou de produire une réécriture critique structurée d'un document.
# SKILL.md
name: rhetorical-analysis
description: "Analyse rhétorique et épistémologique d'articles, discours et textes argumentatifs. Utiliser ce skill quand l'utilisateur demande d'analyser la qualité argumentative d'un texte, d'identifier des sophismes ou biais, d'évaluer la fiabilité des sources citées, de déconstruire la logique d'un raisonnement, ou de produire une réécriture critique structurée d'un document."
Skill d'analyse rhétorique et épistémologique
Ce skill permet d'analyser systématiquement la qualité argumentative d'un texte en combinant plusieurs frameworks établis.
Frameworks d'analyse intégrés
1. Modèle de Toulmin (structure argumentative)
Pour chaque argument identifié, extraire :
- Claim : La thèse défendue
- Grounds : Les preuves/données avancées
- Warrant : Le lien logique implicite entre preuves et thèse
- Backing : Les éléments qui soutiennent ce lien logique
- Qualifier : Les nuances ou restrictions de la thèse
- Rebuttal : Les contre-arguments reconnus ou ignorés
2. Test CRAAP (fiabilité des sources)
Pour chaque source citée, évaluer :
- Currency : Actualité de l'information
- Relevance : Pertinence pour le propos
- Authority : Crédibilité de l'auteur/source
- Accuracy : Vérifiabilité et exactitude
- Purpose : Intention (informer, persuader, vendre...)
3. Catalogue des sophismes
Voir references/fallacies-catalog.md pour la liste complète des sophismes à détecter.
4. Échelle de fiabilité (1-5)
- 5 : Fait établi, consensus scientifique, sources multiples vérifiables
- 4 : Sources sérieuses, raisonnement logique valide, nuances possibles
- 3 : Mélange faits/interprétations, sources partielles
- 2 : Raisonnement contestable, sophismes identifiés
- 1 : Affirmations non sourcées, erreurs logiques majeures
Workflow d'analyse
- Segmentation : Identifier les arguments distincts du texte
- Décomposition Toulmin : Analyser chaque argument selon le modèle
- Évaluation des sources : Appliquer le test CRAAP aux références
- Détection des sophismes : Scanner pour les erreurs de raisonnement
- Synthèse : Produire le tableau d'analyse et la synthèse critique
Format de sortie
Option 1 : Génération automatique via script
- Produire l'analyse au format JSON (voir
assets/example_analysis.jsonpour le schéma) - Exécuter le script de génération :
bash
python scripts/generate_analysis.py analysis.json output.[xlsx|json|md] --format [xlsx|json|md]
Exemples :
python scripts/generate_analysis.py analysis.json rapport_analyse.xlsx --format xlsx
python scripts/generate_analysis.py analysis.json analysis_output.json --format json
python scripts/generate_analysis.py analysis.json rapport.md --format md
Le script génère un fichier de sortie selon le format choisi. Pour le format XLSX, il contient 5 feuilles :
- Analyse rhétorique : Tableau principal
- Détail Toulmin : Structure complète de chaque argument
- Évaluation sources (CRAAP) : Scores des sources citées
- Synthèse : Points forts, faibles, patterns
- Légende : Échelles et définitions
Option 2 : Génération manuelle
Utiliser le skill xlsx pour créer un fichier avec les colonnes :
- N° de l'argument
- Argument traité (résumé)
- Texte original (extrait clé)
- Affirmation / Thèse (Claim)
- Type de raisonnement (Warrant + évaluation)
- Fiabilité (1-5)
- Évaluation détaillée de la fiabilité
- Commentaire critique
Précautions
- Distinguer la conclusion de l'argument : Un argument peut être faible mais mener à une conclusion juste
- Éviter le biais de confirmation : Analyser avec la même rigueur les textes qu'on approuve ou désapprouve
- Reconnaître les limites : Certaines affirmations sont impossibles à évaluer sans expertise domaine
- Contexte militant assumé : Si le texte est explicitement militant, le noter sans que cela invalide l'analyse
# README.md
Rhetorical Analysis Skill
A Claude skill for rhetorical and epistemological analysis of articles, speeches, and argumentative texts.
Features
- Toulmin Model Analysis: Decompose arguments into claim, grounds, warrant, backing, qualifier, and rebuttal
- CRAAP Test: Evaluate source reliability (Currency, Relevance, Authority, Accuracy, Purpose)
- Fallacy Detection: Identify logical fallacies from a comprehensive catalog
- XLSX Report Generation: Export structured analysis to Excel format
Example Data
This repository includes example analysis files that are either synthetic (created for
demonstration) or public domain content:
| File | Content | License |
|---|---|---|
assets/example_analysis.json |
Synthetic article on urban mobility | CC0 (Public Domain) |
assets/example_ddhc_1789.json |
Declaration of Rights of Man 1789 | Public Domain |
These examples demonstrate the analysis format without any copyright concerns. To analyze
your own articles, see the JSON Schema documentation.
Note: The benchmark/ directory (if present) may contain analyses of copyrighted
content and is excluded from the distributed package and git tracking.
Download
Pre-packaged .skill archives are available for download from GitHub Releases.
Installation Steps
- Navigate to the Releases page
- Download the latest
.skillfile (e.g.,rhetorical-analysis-0.1.0.skill) - Use the
.skillfile with your Claude-compatible application
GitHub automatically provides checksums for all release assets if you need to verify integrity.
Development Installation
uv sync --all-extras
Usage
Generate Analysis Report
uv run python scripts/generate_analysis.py input.json output.[xlsx|json|md] --format [xlsx|json|md]
Examples:
uv run python scripts/generate_analysis.py analysis.json rapport_analyse.xlsx --format xlsx
uv run python scripts/generate_analysis.py analysis.json analysis_output.json --format json
uv run python scripts/generate_analysis.py analysis.json rapport.md --format md
Package the Skill
The package_skill.py script validates and packages the skill for distribution.
# Create distributable .skill archive
uv run python scripts/package_skill.py
# Preview files without creating archive
uv run python scripts/package_skill.py --dry-run
# Output to specific directory
uv run python scripts/package_skill.py --output dist/
Validation
The script validates SKILL.md before packaging:
- Requires YAML frontmatter with
nameanddescriptionfields - Enforces maximum 500 lines
Excluded Files
The following patterns are excluded from the archive by default:
| Category | Patterns |
|---|---|
| Version control | .git/, .gitignore |
| Python | .venv/, __pycache__/, *.egg-info/, *.pyc, *.pyo |
| Testing | tests/, .pytest_cache/ |
| IDE/Editor | .claude/, .cursor/, .vscode/, .idea/, .agent/, .opencode/, .github/ |
| Linters | .ruff_cache/, .mypy_cache/, .markdownlint.json |
| Build | uv.lock |
| Development | openspec/, docs/, CLAUDE.md, AGENTS.md |
| Data | benchmark/ (may contain copyrighted content) |
| OS | .DS_Store |
Output
The archive is named {skill-name}-{version}.skill, e.g., rhetorical-analysis-0.1.0.skill.
Development
Run Tests
uv run pytest tests/ -v
Project Structure
.
├── SKILL.md # Skill entry point (read by Claude)
├── scripts/ # Python scripts
│ ├── generate_analysis.py
│ └── package_skill.py
├── references/ # Reference documentation
│ ├── fallacies-catalog.md
│ └── existing-frameworks-and-tools.md
├── assets/ # Example files and templates
│ ├── example_analysis.json # Synthetic example (CC0)
│ ├── example_ddhc_1789.json # Public domain example
│ └── SCHEMA.md # JSON format documentation
├── benchmark/ # Benchmark data (not distributed)
└── tests/ # Unit tests
Creating a Release (Maintainers)
Releases are automated via GitHub Actions when version tags are pushed.
Release Process
- Update version in
pyproject.tomlto match the release version (e.g.,0.1.0) - Commit changes and push to main branch
- Create and push tag with the version number:
bash
git tag v0.1.0
git push origin v0.1.0
- GitHub Actions automatically:
- Runs the packaging script (
scripts/package_skill.py) - Creates a GitHub Release with the tag name
- Uploads the
.skillarchive as release asset
Tagging Conventions
- Standard releases:
v<major>.<minor>.<patch>(e.g.,v1.0.0,v0.2.1) - Pre-releases: Include suffix
-alpha,-beta, or-rc(e.g.,v0.1.0-alpha,v1.0.0-rc1) - Pre-releases are automatically marked as such on GitHub
Version Consistency
Ensure the Git tag version matches the version field in pyproject.toml:
- Tag
v0.1.0should correspond toversion = "0.1.0"inpyproject.toml - The
.skillarchive name is derived frompyproject.toml - Mismatches will be visible to users but won't fail the workflow
Troubleshooting
Workflow fails during packaging:
- Check the workflow logs in the Actions tab
- Verify
SKILL.mdpasses validation (max 500 lines, valid YAML frontmatter) - Test locally:
uv run python scripts/package_skill.py --dry-run
Need to fix a release:
- Delete the tag locally and remotely:
bash
git tag -d v0.1.0
git push origin :refs/tags/v0.1.0
- Delete the GitHub Release in the web interface
- Fix the issue, then create the tag again
License
MIT
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.