From ebf5ffb9c443572b0b51735ef290fc0e011f5da0 Mon Sep 17 00:00:00 2001 From: zypherift Date: Sat, 28 Nov 2026 01:10:18 +0100 Subject: [PATCH] docs: add firka style skills and install notes --- CLAUDE.md | 40 + skills/anti-over-engineering/SKILL.md | 184 ++++ skills/firka-style-website/SKILL.md | 148 ++++ skills/firka-style/SKILL.md | 338 +++++++ skills/graphify/LICENSE | 202 +++++ skills/graphify/LICENSE-MIT | 21 + skills/graphify/NOTICE | 8 + skills/graphify/SKILL.md | 824 ++++++++++++++++++ skills/graphify/SOURCE | 3 + skills/graphify/references/add-watch.md | 56 ++ skills/graphify/references/exports.md | 91 ++ skills/graphify/references/extraction-spec.md | 91 ++ .../graphify/references/github-and-merge.md | 46 + skills/graphify/references/hooks.md | 48 + skills/graphify/references/query.md | 319 +++++++ skills/graphify/references/transcribe.md | 52 ++ skills/graphify/references/update.md | 233 +++++ 17 files changed, 2704 insertions(+) create mode 100644 CLAUDE.md create mode 100644 skills/anti-over-engineering/SKILL.md create mode 100644 skills/firka-style-website/SKILL.md create mode 100644 skills/firka-style/SKILL.md create mode 100644 skills/graphify/LICENSE create mode 100644 skills/graphify/LICENSE-MIT create mode 100644 skills/graphify/NOTICE create mode 100644 skills/graphify/SKILL.md create mode 100644 skills/graphify/SOURCE create mode 100644 skills/graphify/references/add-watch.md create mode 100644 skills/graphify/references/exports.md create mode 100644 skills/graphify/references/extraction-spec.md create mode 100644 skills/graphify/references/github-and-merge.md create mode 100644 skills/graphify/references/hooks.md create mode 100644 skills/graphify/references/query.md create mode 100644 skills/graphify/references/transcribe.md create mode 100644 skills/graphify/references/update.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0ab5d6f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,40 @@ +# Style guide + +This repo holds the skills that set how code, comments and commits look in the Firka projects. When you work here, or are asked to set up a machine, install these three things. + +| What | Where it comes from | What it does | +|------|---------------------|--------------| +| `firka-style` | `skills/firka-style/` | style guide for the Firka mobile app: code, comments, commits, new screens, branching and PRs | +| `anti-over-engineering` | `skills/anti-over-engineering/` | keep changes small, reuse what exists, no new abstractions | +| `graphify` | `skills/graphify/` (original, unchanged) plus the PyPI package `graphifyy` | knowledge graph of a codebase, query it instead of reading every file | + +`skills/firka-style-website/` is the same kind of guide for the website. Install it too if you work on the website. + +## Install + +Check what is already there first, then install only what is missing. Run from the root of this repo. + +```bash +mkdir -p ~/.claude/skills +cp -r skills/firka-style skills/anti-over-engineering skills/graphify ~/.claude/skills/ +# website work only: +cp -r skills/firka-style-website ~/.claude/skills/ + +# graphify also needs its command line tool, skip if `graphify --help` already works +uv tool install graphifyy +graphify install +``` + +- The PyPI name is `graphifyy` with two y's. The command is `graphify`. +- On Arch, plain `pip install` is blocked as externally managed, so use `uv tool` or `pipx`. +- If `graphify` is not found afterwards, add `~/.local/bin` to PATH (`uv tool update-shell`). +- `graphify install` writes the same skill again and adds a short entry to `~/.claude/CLAUDE.md`, which is what makes `/graphify` trigger. Both are expected. The copy in this repo is version 0.9.121, see `skills/graphify/SOURCE`. +- Restart Claude Code when done, skills are only picked up in a new session. + +## Working in this repo + +- The skills here are the source. Edit them here, then copy them to `~/.claude/skills/` again. Do not edit the installed copies. +- `anti-over-engineering` and `graphify` are third-party and kept as the originals. Do not edit them. `anti-over-engineering` is from agents-inc/skills (MIT, by @vince) and was deleted upstream in March 2026, keep the attribution comment at the top. `graphify` is Apache-2.0, keep its `LICENSE`, `LICENSE-MIT` and `NOTICE`. +- `firka-style` and `firka-style-website` are ours and do not repeat the other two. +- Commits: plain and human. No mention of Claude or any AI in a message, no `Co-Authored-By`. Use the format in `skills/firka-style/SKILL.md`, section 9. +- Do not commit or push unless asked. diff --git a/skills/anti-over-engineering/SKILL.md b/skills/anti-over-engineering/SKILL.md new file mode 100644 index 0000000..772d52a --- /dev/null +++ b/skills/anti-over-engineering/SKILL.md @@ -0,0 +1,184 @@ +--- +name: anti-over-engineering +description: Surgical implementation, not architectural innovation. Use existing utilities, make minimal changes, follow established conventions, add no new abstractions. Apply to every implementation task. +--- + + +# Anti-Over-Engineering Principles + +> **Quick Guide:** Your job is surgical implementation, not architectural innovation. Use existing utilities, make minimal changes, follow established conventions. + +--- + + + +## CRITICAL: Your Job is Surgical Implementation + +**(Use existing utilities - search the codebase before creating anything new)** + +**(Make minimal changes - only what the spec explicitly requires)** + +**(Follow established conventions - match naming, formatting, organization)** + +**(Never create new abstractions, helpers, or "for future flexibility" code)** + + + +--- + + + +**Your job is surgical implementation, not architectural innovation.** + +Analyze thoroughly and examine similar areas of the codebase to ensure your proposed approach fits seamlessly with the established patterns and architecture. Aim to make only minimal and necessary changes, avoiding any disruption to the existing design. + +### What to NEVER Do (Unless Explicitly Requested) + +**Don't create new abstractions:** + +- No new base classes, factories, or helper utilities +- No "for future flexibility" code +- Use what exists - don't build new infrastructure +- Never create new utility functions when existing ones work + +**Don't add unrequested features:** + +- Stick to the exact requirements +- "While I'm here" syndrome is forbidden +- Every line must be justified by the spec + +**Don't refactor existing code:** + +- Leave working code alone +- Only touch what the spec says to change +- Refactoring is a separate task, not your job + +**Don't optimize prematurely:** + +- Don't add caching unless asked +- Don't rewrite algorithms unless broken +- Existing performance is acceptable + +**Don't introduce new patterns:** + +- Follow what's already there +- Consistency > "better" ways +- If the codebase uses pattern X, use pattern X + +**Don't create complex state management:** + +- For simple features, use simple solutions +- Match the complexity level of similar features + +### What TO Do + +**Use existing utilities:** + +- Search the codebase for existing solutions +- Check utility functions in `/lib` or `/utils` +- Check helper functions in similar components +- Check shared services and modules +- Reuse components, functions, types +- Ask before creating anything new + +**Make minimal changes:** + +- Change only what's broken or missing +- Ask yourself: What's the smallest change that solves this? +- Am I modifying more files than necessary? +- Could I use an existing pattern instead? +- Preserve existing structure and style +- Leave the rest untouched + +**Use as few lines of code as possible:** + +- While maintaining clarity and following existing patterns + +**Follow established conventions:** + +- Match naming, formatting, organization +- Use the same libraries and approaches +- When in doubt, copy nearby code + +**Follow patterns in referenced example files exactly:** + +- When spec says "follow auth.py", match its structure precisely + +**Question complexity:** + +- If your solution feels complex, it probably is +- Simpler is almost always better +- Ask for clarification if unclear + +**Focus on solving the stated problem only:** + +- **(Do not change anything not explicitly mentioned in the specification)** +- This prevents 70%+ of unwanted refactoring + + + +--- + + + +## Decision Framework + +Before writing code, ask yourself: + +```xml + +1. Does an existing utility do this? -> Use it +2. Is this explicitly in the spec? -> If no, don't add it +3. Does this change existing working code? -> Minimize it +4. Am I introducing a new pattern? -> Stop, use existing patterns +5. Could this be simpler? -> Make it simpler + +``` + +### When in Doubt + +**Ask yourself:** "Am I solving the problem or improving the codebase?" + +- Solving the problem = good +- Improving the codebase = only if explicitly asked + +**Remember: Every line of code is a liability.** Less code = less to maintain = better. + +**Remember: Code that doesn't exist can't break.** + + + +--- + + + +## Proven Effective Phrases + +Include these in your responses when applicable: + +- "I found an existing utility in [file] that handles this" +- "The simplest solution matching our patterns is..." +- "To make minimal changes, I'll modify only [specific files]" +- "This matches the approach used in [existing feature]" + + + +--- + + + +## CRITICAL REMINDERS + +**(Your job is surgical implementation, not architectural innovation)** + +**(Use existing utilities - search before creating)** + +**(Make minimal changes - only what the spec requires)** + +**(Follow established conventions - match existing code)** + +**(Never create new abstractions unless explicitly requested)** + +**(Every line must be justified by the spec)** + + diff --git a/skills/firka-style-website/SKILL.md b/skills/firka-style-website/SKILL.md new file mode 100644 index 0000000..1bec42f --- /dev/null +++ b/skills/firka-style-website/SKILL.md @@ -0,0 +1,148 @@ +--- +name: firka-style-website +description: How code, comments and commits should look in the Firka website app. Use it for any code change, any comment you write, and any commit message. Works with the anti-over-engineering and graphify skills, which are separate. +--- + +# Firka style + +One file, three things: how the app's code looks, how commits and comments read, and the two helper skills (anti-over-engineering and graphify) we work with. It is written from the app in `src/` (React 19, TypeScript, Vite). The Rust backend in `server/` is not covered. + +## Install + +This file lives in the `style-guide` repo and is installed from there, see that repo's `CLAUDE.md`. Edit it in the repo, then copy it to `~/.claude/skills/`. It works together with two other skills from the same repo, `anti-over-engineering` and `graphify`, and does not repeat them. + +--- + +## 1. Rules of the job + +1. Do what was asked and nothing else. +2. Read the neighbouring code first and copy how it does things. +3. Look for an existing helper before writing a new one. +4. Do not add files, abstractions or scripts that nobody asked for. +5. If you are about to write a throwaway script or a long chain of shell commands, stop and check whether one command or one edit does the job. + +## 2. How the code looks + +These are facts about the current code. Match them. + +**Language and tooling** +- TypeScript in strict mode. `noUnusedLocals` and `noUnusedParameters` are on, so unused things fail the build. Do not leave them around. +- No `any`, no `@ts-ignore`, no `console.*`. The code has none of them today. +- Use `type`, never `interface`. Props are typed inline in the function signature, or as a local `type` above the component when they are long. +- No linter or formatter config exists. Follow the existing look: 2 spaces, single quotes, semicolons, trailing commas in multi-line literals, `const` by default. +- Lines are wrapped around 100 characters. A few data tables and signatures run longer. Do not reformat existing lines you did not change. + +**Components** +- Function components with named exports. `App` is the only default export. +- Related components share a file when they are small and belong to one page (`Help.tsx` has six). A new file is for a new page area, not for every component. +- Primitives live in `components/ui.tsx` (`Button`, `MaskIcon`, `Dave`). Check there before building a new one. +- Static data sits in an `UPPER_SNAKE` constant above the component (`SOCIALS`, `ROWS`, `COLUMNS`, `STATUS_LABEL`) and the component maps over it. +- All outbound and shared URLs go in `src/links.ts`. Do not hardcode a URL in a component. +- Images are imported from `src/assets` and passed as `src`. Name the import after what it is (`moonSrc`, `dlFdroid`). +- Accessibility is part of the component: `aria-label` on icon-only controls, `aria-hidden` on decoration, real `