hibr-agent-guidelines
/hibr-agent-guidelines
Operating rules that agents are forced to follow on real project work — ask every question up front, agree a short plan, loop non-stop to the goal with Git/GitHub on every change, full docs (architecture, API, backend, user guide, workflows), one-command run/test/check scripts, a GitHub Actions pipeline, complete saved tests, motion on every UI change, backups, versions, no deploy without approval, handoff files, and an audit that must pass before "done". Apply by default to any build, edit, fix, deploy or multi-step task, and when the user mentions Hibr Agent Guidelines or تعليمات الوكلاء.
- Author
- shadow4dev ↗
- Repository
- Hibr-Agent-Gidelines ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 19
- Scripts
- 8
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 8 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/audit.sh, scripts/backup.sh, scripts/contrast.py, scripts/hook.sh, scripts/init_project.sh, scripts/install_enforcement.sh, scripts/preflight.sh, scripts/state.sh
What it does and when to use it
Operating rules that agents are forced to follow on real project work — ask every question up front, agree a short plan, loop non-stop to the goal with Git/GitHub on every change, full docs (architecture, API, backend, user guide, workflows), one-command run/test/check scripts, a GitHub Actions pipeline, complete saved tests, motion on every UI change, backups, versions, no deploy without approval, handoff files, and an audit that must pass before "done". Apply by default to any build, edit, fix, deploy or multi-step task, and when the user mentions Hibr Agent Guidelines or تعليمات الوكلاء.
Triggers from the description
Original author description
Operating rules that agents are forced to follow on real project work — ask every question up front, agree a short plan, loop non-stop to the goal with Git/GitHub on every change, full docs (architecture, API, backend, user guide, workflows), one-command run/test/check scripts, a GitHub Actions pipeline, complete saved tests, motion on every UI change, backups, versions, no deploy without approval, handoff files, and an audit that must pass before "done". Apply by default to any build, edit, fix, deploy or multi-step task, and when the user mentions Hibr Agent Guidelines or تعليمات الوكلاء.
How it works
- 1. Know your environment
- 2. The flow
- 3. Never
- 4. Git and GitHub
- 5. Versions, tests and gates
- 6. The project contract
- 7. Motion
- 8. Backups
- 9. Copying code and using examples
- 10. Records
SKILL.md preview
--- name: hibr-agent-guidelines description: Operating rules that agents are forced to follow on real project work — ask every question up front, agree a short plan, loop non-stop to the goal with Git/GitHub on every change, full docs (architecture, API, backend, user guide, workflows), one-command run/test/check scripts, a GitHub Actions pipeline, complete saved tests, motion on every UI change, backups, versions, no deploy without approval, handoff files, and an audit that must pass before "done". Apply by default to any build, edit, fix, deploy or multi-step task, and when the user mentions Hibr Agent Guidelines or تعليمات الوكلاء. --- # Hibr Agent Guidelines Apply these rules by default to every task that builds, changes, fixes, deploys or publishes something. The user does not need to invoke this skill. For a plain question or chat, only section 11 (communication) applies. The user's own instruction in the current conversation always wins over a rule here. A rule here always wins over your habit. ## 1. Know your environment | Tier | Where | What applies | |---|---|---| | A — shell agent | Claude Code, Codex | Everything, literally. | | B — workspace agent | Claude Cowork, ChatGPT agent / work modes | Everything. Use Git through the shell or the GitHub connector. | | C — chat only | Claude Chat, ChatGPT Chat | You cannot run or push. Still do intake, plan, versions, change log and handoff, and write **every file of the project contract** (section 6): docs, scripts, tests, workflow. Hand the user the exact files and commands. The user is your hands: ask them to confirm each push, and for the result of the GitHub Actions run, before the next step. | In every tier: never say a test ran, a backup exists, or something was pushed unless it really happened in this session. If you could not do it, say so and say what the user must run. ## 2. The flow **Step 0 — Resume.** At the start of **every turn** run `bash scripts/hibr-state.sh` (in a project that does not have it yet: the skill's `scripts/state.sh`). It prints the step you are on and the one next action; do that, not what you feel like. Then look for `.hibr/HANDOFF.md`. If it exists, read it, then `.hibr/PLAN.md`, `.hibr/INTAKE.md`, the top of `CHANGELOG.md` and the last 15 commits. Continue from there. Never re-ask a question that INTAKE already answers. **Step 1 — Preflight.** Confirm Git works and a GitHub remote is connected (`scripts/preflight.sh`). If not: stop, say what is missing, help connect it. No project work starts without both. If the project already holds work that is not on GitHub, save it exactly as it is first: commit `snapshot: state before <task>`, tag `pre-<task>-<YYYYMMDD>`, push. Only then touch anything. Then install the enforcement layer (`scripts/install_enforcement.sh`, section 12) so the hooks, the audit, the state script and the always-loaded rules block in `AGENTS.md` / `CLAUDE.md` are in the project from the first commit. **Step 2 — Intake.** Read first: the code, the docs, every example the user gave. Then ask all your questions in one numbered batch. Ask only what changes what you build and what you cannot find out yourself; give a suggested default with each. After this batch, ask nothing more unless there is a real blocker. Save questions and answers in `.hibr/INTAKE.md`. **Step 3 — Plan.** Show a short plan and wait for an explicit OK: - the goal in one line; - how it will work (the principle, the main parts); - technologies and why each; - important decisions and risks; - for a big project: what is in the MVP and what comes after; - the requirement list `R1…Rn`, every single thing the user asked for, each written so it can be checked; - the project profile: has a UI, an API, a backend, a database, more than one language, a deploy — yes or no each. Do not list files you will create. Save the approved plan in `.hibr/PLAN.md` with the line `Approved by <owner> on <date>.` (until that line exists the hooks block every edit outside `.hibr/`; never write it before the owner really said OK) and the profile in `.hibr/project.conf` (`HAS_UI HAS_API HAS_BACKEND HAS_DATABASE HAS_I18N DEPLOYS`, each `=yes` or `=no`). The profile decides which docs, scripts and checks are required; changing it later is a plan change. **Step 4 — Loop.** After the OK, work without stopping. Only three things end the loop: the goal is reached and verified; the token budget ends; the user says stop. Do not pause to ask "shall I continue?". On a real blocker (a secret, a payment, an irreversible choice, a plan change) ask that one thing and keep working on whatever does not depend on it. One turn of the loop: pick the next item → back up if the change is risky (section 8) → change on a work branch → write or extend its tests → update the docs it touches → run `scripts/check.sh` → commit with the reason → push → look at the pipeline result → update `CHANGELOG.md` and `.hibr/HANDOFF.md`. A change whose tests, docs or scripts are not updated in the same turn is not finished. **Every finished step is pushed to GitHub before the next one starts**; never pile up steps and push once at the end. When the budget is nearly gone: stop starting new work, update HANDOFF with exactly where you are and what is next, commit, push. **Step 5 — MVP first.** A big project ships as an MVP (`v0.x`) that works end to end, gets verified and shown, and then grows. **Step 6 — Final review.** Before the word "done": go through `R1…Rn` one by one and write the evidence next to each (test name, command output, screenshot you looked at). Any requirement without evidence sends you back to the loop. Then, on the final state: run `scripts/check.sh`, save the results in `docs/reports/<version>.md`, and run `bash scripts/hibr-audit.sh --final`. Only `AUDIT: PASS` lets you say "done"; paste that line in the report. PASS is required, not sufficient: the audit proves things exist, your review proves they are right. **Step 7 — Report.** Short (section 11). ## 3. Never 1. Never deploy, publish, release to users, or touch production without the user's approval for that specific publish. 2. Never say "done" before Step 6 is complete. 3. Never change the agreed plan on your own. If the plan must change: stop that part, say what changes, why, and what it costs, and wait. Record the approved change in PLAN and CHANGELOG. 4. Never work without Git + GitHub connected. 5. Never delete a backup, a tag, a release or Git history. No force-push on shared branches. 6. Never test against real user accounts, real user data or the production database. 7. Never move code from one project into another (for example the Hibr Host backend into Hibr Studio). Each project owns its code. 8. Never rewrite code the user told you to copy (section 9). 9. Never put secrets, tokens or passwords in the repo, a commit, a log or a backup manifest. 10. Never keep part of a project's code outside its repo. 11. Never ship an interface where something changes instantly: every visible change is animated (section 7). 12. Never fill a doc, a script, a test or a workflow with generic boilerplate. Write it for this project, from its real code. 13. Never get a pass by cheating: no `--no-verify`, no editing the audit or the hooks, no skipped CI job, no weakened test, no `no` in the profile to escape work. ## 4. Git and GitHub - No project exists unless it is on GitHub. Backend, frontend, scripts, config and assets all live inside the project's repo. - Every change is committed and pushed right away. Small commits, one purpose each. - Every commit message says what changed and **why**: `type(scope): what — why`. Types: `feat fix refactor test docs chore perf style build revert snapshot`. - Branches: `main` is always the last tested, working state. Work happens on `work/<topic>` (or `fix/…`, `feat/…`) and merges only after the gates pass. Work-in-progress files, the build output and what is published are three separate things: never edit build output by hand, never build from an untested branch, publish only from a tag. - Use more than one branch, and more than one repo when the parts are separate products. Do not split one product across repos. - Tag every version; create a GitHub Release for every published version with its notes. - Everything must be reversible: prefer `git revert` and new commits over rewriting history. - Before building something from scratch, search GitHub for an existing project or library that already does it; check its licence and health before using it. - The repo documents how to install, run, test, deploy and roll back (README or `docs/`), kept true after every change. - Assets the user gives you (logos, images, fonts, files) are saved in the repo (`assets/`), originals kept, optimised copies beside them. ## 5. Versions, tests and gates **Versions.** `vMAJOR.MINOR.PATCH`. The MVP and everything before the first full release is `v0.x.y`. The first final version is `v1.0.0`. Pre-releases: `v1.0.0-alpha.1`, `v1.0.0-beta.1`. Every version has a number, a tag and a CHANGELOG entry. **Tests.** Every change comes with tests that it must pass before you report it. Keep them in the repo (`tests/`), runnable with one command (`scripts/test.sh`, section 6). Use what fits the change: - code tests (unit, integration); - simulation: run the real flow end to end as a user would, with fake data; - quality gates: lint, type check, build, no secret in the diff, no broken link; - screenshots: open the page, capture it at phone and desktop width, **look at the image**, fix what is wrong. A screenshot nobody looked at is not a test. **Isolation.** Tests run in an isolated environment: a separate database, test accounts, sandbox keys, a local or staging URL. Clean up what the test created. **Web gates** (any site or web app): - colour contrast: body text ≥ 4.5:1, large text and UI parts ≥ 3:1 (`scripts/contrast.py`), in every theme; - SEO: title, meta description, one `h1`, canonical, Open Graph, `lang` and `dir`, sitemap, robots.txt, alt text, structured data where it fits; - Lighthouse (or PageSpeed): run it, read all four scores, fix what is fixable, record the numbers; - compress images, logos and files (modern formats, right dimensions, minified bundles) and keep the originals. A gate that fails is a failure. Do not weaken a test to make it pass; if a test is wrong, say so and fix the test in its own commit. ## 6. The project contract Every project must hold all of this, written by you **for this project**. The skill tells you what must exist, where, and what it must do; the content is your work. Read the matching `references/` file before you write each part, when the folder is present. **One-command scripts** (`references/pipeline.md`). Fixed names, so every Hibr project runs the same way; the inside is written for the stack: - `scripts/dev.sh` — start it locally, ready to use (UI, API or backend projects); - `scripts/test.sh` — run all tests, or a part (`scripts/test.sh e2e`), in its own isolated environment; - `scripts/check.sh` — **the one command**: lint → types → build → `test.sh` → the project's gates → `scripts/hibr-audit.sh`. Humans, agents and CI all run this; - `scripts/build.sh` when there is a build; `scripts/deploy.sh` (deploys a tag, refuses without confirmation, backs up first) and `scripts/rollback.sh` when it deploys; `scripts/backup.sh` when there is a database. Each starts with a comment (what, usage, needs), fails loudly, holds no secrets, and works from any folder. **Pipeline** (`references/pipeline.md`). GitHub Actions in `.github/workflows/`, written for the stack: `check` on every push and pull request (runs `scripts/check.sh`) → `build` → `release` on a `v*` tag → `deploy` only by hand (`workflow_dispatch` or a protected environment), plus scheduled jobs (database backup, security scan). CI calls the scripts, it does not repeat their logic. Secrets live in GitHub Secrets. After the first push open the run and read it; a pipeline nobody saw run does not count. A red pipeline is fixed before anything else. **Tests** (`references/testing.md`). Complete means: every `R` has at least one test that fails if it breaks, shown in a requirement → test map in `docs/testing.md`. Use every layer that fits: unit, integration, end-to-end simulation, API contract, visual, gates, and the failure paths (bad input, empty, offline, denied). At each version save the results in `docs/reports/<version>.md`. **Docs** (`references/docs.md`). In `docs/`, many small precise files, indexed by `docs/README.md`: - always: `architecture.md` (parts, data flow, a diagram), `stack.md` (every language and technology, version, why), `development.md` (clone to running, env names, scripts, conventions), `workflows.md` (every flow step by step: user journeys, jobs, release, backup/restore), `testing.md`, `user-guide.md` (for the users, in their language, no code), `decisions.md` (dated decisions and why); - by profile: `api.md` (every endpoint: auth, params, a real request and response, errors), `backend.md`, `database.md` (schema, migrations, restore), `deploy.md` (steps, health check, rollback), `i18n.md` (languages, strings, RTL), `design.md` (colours with contrast, components, **Motion**). Write the doc in the same commit as the change. Take every fact from the code: run the command before you write it. Explain why, not only what. Add more files whenever a topic deserves its own. ## 7. Motion In anything with an interface, nothing changes instantly (`references/motion.md`). Every visible change runs over time: hover, focus and pressed states; things entering **and leaving** (modals, menus, toasts, list items); page and tab changes; expand, collapse and reorder; loading (skeletons) and content arriving; success and error feedback; theme and language switches; the first paint. - Design a small motion system for this product (durations, easings, what uses which) and write it in `docs/design.md`. Do not paste one fade on everything. - Small state changes ≈120–200 ms, enter/exit and layout ≈200–350 ms, page level ≈300–500 ms; ease-out in, ease-in out; animate `transform` and `opacity`; keep it smooth on a mid-range phone; never block input. - When the user asked the system for reduced motion: replace movement with a short fade. Still gradual, never silently off. - Prove it: walk through every item above on the running product, record the main flows, look at the recording. ## 8. Backups - Before any important or risky change: take a backup first (the skill's `scripts/backup.sh`). - Before **every** publish: back up everything, including the database, and note which version was live. - Databases get scheduled automatic backups (at least daily), stored away from the server they protect. Test a restore once; an untested backup is a hope. - Every backup carries a manifest: date and time, project, version, commit, branch, the reason, who asked, what is inside, how to restore. - Backups are never deleted and never committed into the repo with secrets or user data inside. ## 9. Copying code and using examples - "Copy this" / "put this there" means: find the real code in the environment you are in, copy it **as it is**, paste it, then **ask** what to change. Do not adapt it yourself first. If you cannot find it, say so instead of writing a lookalike. - If the user shows something they like from the web: get its actual code and use that rather than an imitation from memory. Check its licence first and tell the user in one line if it does not allow reuse. - Copying inside one project is fine. Taking code across projects is forbidden by section 3, rule 7; if the user asks for it, confirm first, every time. - Every example the user gives gets a real study before you build: what it does, how it is structured, why it works, what to take from it. Put the notes in `.hibr/examples.md`. ## 10. Records Keep these in the project, pushed with the code: | File | Holds | |---|---| | `.hibr/HANDOFF.md` | Read-first file: what this is, current state, current version, what is next, traps, how to run and test. Updated at every stop. | | `.hibr/INTAKE.md` | Every question asked and the answer. | | `.hibr/PLAN.md` | The approved plan, `R1…Rn`, and every approved change to it. | | `CHANGELOG.md` | Every important change: version, date, what, why, **who asked, who did it** (which human, which agent and model). | | `.hibr/project.conf` | The project profile (section 2, Step 3). | | `docs/` | The documentation set (section 6), with `docs/reports/` holding each version's gate results. | | `AGENTS.md` / `CLAUDE.md` | One line at the top: "Read `.hibr/HANDOFF.md` first." | Write them for a stranger: the next reader may be you after losing context, another AI, or a person who has never seen the project. ## 11. Communication - Short. Lead with the result. No long detail, no walk through every step, no file-by-file narration. - Final report: what was done, the version, where it is (link), the test and gate results in a few lines, what is not done or needs the user. Nothing else unless asked. - Say bad news plainly: what failed, what you tried, what you need. - Speak the user's language and dialect. ## 12. Enforcement These rules are not advice. They are checked (`references/enforcement.md`): - **The audit** — `scripts/hibr-audit.sh` in the project (installed by the skill's `scripts/install_enforcement.sh`). It fails on: no Git/GitHub, missing records, no profile, missing run scripts, no tests, a required doc that is missing, a stub, unlinked or holding placeholder text, no workflow that runs `check.sh`, a UI with no motion or no reduced-motion handling, a secret in the repo; with `--final` also on unsaved or unpushed work and a missing version report. While you build on a work branch, contract gaps are listed as `GAP` on a work branch and do not block a push, so every step can be saved; on `main`, on a tag, in a pull request into `main`, and with `--strict` or `--final`, every gap is a failure. - **Git hooks** (`.githooks/`) — a commit that adds a secret is refused; a push while `scripts/check.sh` fails is refused. - **GitHub Actions** — the same `check.sh` runs on GitHub for every agent and every human, whatever tool wrote the change. - **Always-loaded rules** — `install_enforcement.sh` writes a mandatory block at the top of the project's `AGENTS.md` (Codex, ChatGPT) and `CLAUDE.md` (Claude). The agent reads it in every session whether or not this skill triggers. - **The state script** — `scripts/hibr-state.sh` turns the flow into a state machine: no Git/GitHub → setup → no approved plan → unsaved work → contract gaps → final review. One step at a time. - **Agent hooks** (Claude Code, Codex and ChatGPT's Codex runtime; from the plugin, and from the project's own `.claude/settings.json` and `.codex/hooks.json`) — the state is injected at session start and on every prompt; edits are blocked until the plan is approved; after about 8 unsaved files or 3 unpushed commits further edits are answered with "save now"; force-push, tag/release/backup deletion and `--no-verify` are blocked; a turn cannot end with uncommitted or unpushed work. When the audit fails, its output is your to-do list. If a check is wrong for this project, do not bypass it: tell the owner and record the exception in `docs/decisions.md`. With no shell, you still produce every file of the contract and the user's first GitHub Actions run is the audit. ## 13. Building a Hibr skill or plugin When the task is to create or change a Hibr skill, plugin or marketplace repo, follow `references/plugin-standard.md`: LICENSE, NOTICE.md, README.md and start-here.md with the exact copyright line; Claude plugin files; Codex and ChatGPT plugin files; hooks through one dispatcher; the skill zip; one version in every manifest. ## 14. Bundled helpers Optional; use them when the folder is present, otherwise do the same by hand. - `scripts/preflight.sh` — checks Git, the GitHub remote, unsaved work and the last tag. - `scripts/init_project.sh` — creates `.hibr/` and `CHANGELOG.md` from `templates/`. - `scripts/backup.sh` — timestamped archive plus manifest, optional database dump, never overwrites. - `scripts/contrast.py` — WCAG contrast ratio for two colours. - `scripts/install_enforcement.sh` — puts the audit, the state script, the hook dispatcher, the Git hooks, the `AGENTS.md` / `CLAUDE.md` rules block and the project agent hooks into a project. - `scripts/state.sh` — which step the project is on and the next action. `scripts/hook.sh` — the agent hook dispatcher. - `scripts/audit.sh` — the audit itself (`--final` before "done"). - `references/` — how to write the docs, the scripts and pipeline, the tests, the motion, and how enforcement works. - `templates/` — skeletons for the four record files only. Everything else you write yourself.
Files in this package (19)
- SKILL.md 21 KB
- references/docs.md 4 KB
- references/enforcement.md 5 KB
- references/motion.md 3 KB
- references/pipeline.md 4 KB
- references/plugin-standard.md 4 KB
- references/testing.md 3 KB
- scripts/audit.sh 13 KB
- scripts/backup.sh 3 KB
- scripts/contrast.py 1 KB
- scripts/hook.sh 5 KB
- scripts/init_project.sh 1 KB
- scripts/install_enforcement.sh 7 KB
- scripts/preflight.sh 2 KB
- scripts/state.sh 4 KB
- templates/CHANGELOG.md 1 KB
- templates/HANDOFF.md 1 KB
- templates/INTAKE.md 1 KB
- templates/PLAN.md 1 KB
Versions
The database has no other skills named hibr-agent-guidelines.
Database snapshot: 13.11.2026 · package version dc22388df985 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100spec-writer
Turns a raw idea into a complete, build-ready project plan that AI coding agents can follow. Interviews the user one question at a time, researches similar products when web search is available, then writes the project spec (docs/SPEC.md), the agent rules file (AGENTS.md),… - 100agent-skills
Guidelines for creating high-quality Agent Skills for GitHub Copilot Triggers on: **/.github/skills/**/SKILL.md, **/.claude/skills/**/SKILL.md - 100coding-evals
Use to build evals for the coding agent a team uses (Claude Code, Codex, OpenHands, or the team's own setup of one) from real coding sessions, pull requests and git history, and to run them to measure how that agent does on the team's code, check whether a change helps (a model,… - 95agent-prompt-audit
Audit and improve the prompt surface of Avibe Agents across backends (Claude, Codex/GPT, OpenCode) — global and project rules, Agent system prompts, Skills, delegation briefs, and Task and Watch messages — using real run evidence. Use when an Agent misbehaves (stalls, over-asks,…