Synthèse automatique
Cette compétence modifie un SKILL.md existant du dépôt KMP Agent Skills tout en préservant les sections obligatoires, la fraîcheur des versions et la cohérence des tests.
Points forts
- Liste explicite des sections et champs requis (frontmatter, When to Use, Anti-Patterns, Related Skills…) qui ne doivent jamais être supprimés
- Vérification préalable des problèmes de qualité via scripts/scan_skill_issues.py avant toute édition
- Encadre les modifications par des règles concrètes : bump de last-updated, snippets Kotlin compilables, format de section Testing avec Fake et au moins deux @Test
- Rappelle la mise à jour des tests unitaires et le hook pre-commit lors d'une modification de script Python
Limites
- Suppose l'arborescence exacte du dépôt (skills/, scripts/, tests/, skills.json) : inutilisable tel quel ailleurs
- Ne couvre pas la création, le renommage ou la fusion de compétences — seulement la modification sur place
- La numérotation des règles est incohérente (la règle 8 précède la 7) et la section Step 3 est tronquée dans le fichier
- Dépend de scripts d'audit externes qui ne sont pas fournis avec la compétence
À utiliser lorsqu'un contributeur doit corriger, enrichir ou mettre à jour une compétence KMP existante sans casser le pipeline d'audit du dépôt.
À éviter pour créer une nouvelle compétence, renommer un dossier de skills, ou travailler sur un dépôt qui n'utilise pas la structure et les scripts d'audit des KMP Agent Skills.
Analyse de sécurité
PrudenceThe skill does not contain destructive, exfiltration, or obfuscated instructions. However, it is a maintainer workflow that invokes local Python scripts, shell commands, git commits, and a release script. The main risks are unquoted argument interpolation and automated commit/release actions without explicit confirmation. These are legitimate but powerful operations, so the appropriate rating is caution rather than safe.
- •No allowed-tools declaration despite instructing execution of `python3`, `git`, `grep`, and repository scripts; tool permissions are implicit.
- •Interpolates `$ARGUMENTS` unquoted into shell commands such as `grep $ARGUMENTS` and `git add skills/kmp-$ARGUMENTS/SKILL.md`, which can break or enable shell metacharacter injection if arguments are untrusted.
- •Runs `git commit` and `python3 scripts/release.py patch` as part of the workflow without an explicit confirmation gate, making repository/release actions consequential.
- •Executes local repository scripts (`scan_skill_issues.py`, `audit_skills_repo.py`, `release.py`) whose behavior depends on repo contents and could modify files.
Exemples
/kmp-modify-skill repository-pattern — add a Testing section with a FakeRepository and two @Test functions (happy path + error case), keeping all required sections intact./kmp-modify-skill design-system — update the Ktor version in the TOML snippets to 3.0.1, adjust the Freshness rule text, and bump last-updated in the frontmatter./kmp-modify-skill kmp-repository-pattern — add an anti-pattern about exposing DTOs from the repository layer, with a before/after Kotlin code pair under Common Anti-Patterns./kmp-modify-skill $ARGUMENTS
KMP Agent Skills — modify an existing skill safely: add or update a section, fix a pattern, bump library versions, or resolve a flagged quality gap.
Skill name: $ARGUMENTS (e.g. repository-pattern, design-system)
Rules — read before touching any SKILL.md
These protect the collection's coherence. Violating them breaks the audit and pipeline.
1. Never remove required sections
Every SKILL.md must keep all of these — removing any one will fail audit_skills_repo.py:
| Section / field | Where it lives |
|---|---|
| YAML frontmatter (name, description, metadata, last-updated) | Top of file |
| ## When to Use This Skill | Body |
| **Trigger keywords:** | Inside "When to Use" |
| **Freshness rule:** | Inside "When to Use" or early body |
| ## Recommendation First | Body |
| ## Common Anti-Patterns | Body |
| ## Related Skills | Body |
| ## Output Style | Body |
2. Always bump last-updated
Any substantive edit must update last-updated: '<YYYY-MM-DD>' in the frontmatter.
Typo fixes may skip this. When in doubt, update it.
3. Keep code snippets compilable
Every Kotlin snippet must be syntactically valid. Do not write pseudocode or partial imports. If you can't write a complete snippet, write a prose description instead.
4. Prefer adding to anti-patterns over deleting patterns
If a pattern is superseded, mark it as such with a comment rather than deleting it. Deletion loses the institutional memory of why the pattern was wrong.
5. Testing section format
## Testing
```kotlin
class FakeXxx : XxxInterface {
// minimal implementation for unit tests
}
@Test fun `happy path description`() = runTest {
// ...
}
A Testing section must include:
- At least one `Fake` implementation for the skill's main abstraction
- At least two `@Test` functions (happy path + error/edge case)
- Integration test pattern if the skill wraps a real driver or platform API
### 6. Do not change skill names or directory names
The `name:` field in frontmatter and the directory name under `skills/` must match
the entry in `skills.json`. Renaming without updating `skills.json` breaks routing.
### 8. Update tests when modifying a bundled script
If the modification touches any `.py` file under `skills/kmp-$ARGUMENTS/scripts/`
or any file under the top-level `scripts/`, update the matching `tests/test_<script-name>.py`
(tests are one file per script under `tests/`) in the same commit. The pre-commit hook
(`hooks/pre-commit-audit.sh`) will block the commit otherwise.
The test update must:
- Add a test for every new function introduced
- Update or remove tests for any function signature that changed
- Verify all new `main()` exit code paths are covered
### 7. Do not merge two skills
Each SKILL.md covers one concern. If a skill feels too broad, add a `## Related Skills`
pointer to the closely related skill — do not fold one into the other.
---
## Step 1 — Identify the skill
```bash
ls skills/ | grep $ARGUMENTS
If ambiguous, show a list and ask the user to confirm.
Step 2 — Check current quality gaps
python3 scripts/scan_skill_issues.py | python3 -c "
import json, sys
d = json.load(sys.stdin)
issues = [i for i in d['issues'] if '$ARGUMENTS' in i['skill_dir']]
for i in issues:
print(f\"{i['severity']}: {i['check']} — {i['detail']}\")
"
Show any open issues for this skill before making changes.
Step 3 — Make the edit
Apply the change following the rules above. Common modifications:
| Change type | What to do |
|---|---|
| Add a Testing section | Add ## Testing before ## Common Anti-Patterns |
| Update a library version | Update the version in TOML snippets AND check Freshness rule |
| Add an anti-pattern | Add a bullet under ## Common Anti-Patterns; include a before/after code pair |
| Fix a code snippet | Replace only the affected snippet; do not touch surrounding prose |
| Add a new section | Place it before ## Common Anti-Patterns unless it is a terminal section |
Step 4 — Verify the edit
python3 skills/kmp-audit/scripts/audit_skills_repo.py .
Zero findings expected. If findings appear, fix them before proceeding.
Step 5 — Update last-updated and commit
- Set
last-updated: '<today>'in the skill's frontmatter - Commit:
git add skills/kmp-$ARGUMENTS/SKILL.md git commit -m "docs(<skill>): <what changed>" - Cut a patch release:
python3 scripts/release.py patch
Notes
- If the edit closes a gap from
/summarize-issues, re-run the scanner after to confirm the issue count dropped:python3 scripts/scan_skill_issues.py | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['total_issues'], 'issues remaining')" - If you're updating library versions, also update the skill's
Freshness rule:text to reflect the new minimum version and the date rechecked. - Do NOT modify
skills.jsondirectly — it is managed byscripts/release.py.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/safely-modify-an-existing-kmp-skill-mtzb82xc/download' --output '.skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc/SKILL.md.part' && mv '.skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc/SKILL.md.part' '.skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.
Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/safely-modify-an-existing-kmp-skill-mtzb82xc/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.