workspace-import
Skill1 starsChanged 27 days agoApache-2.0View on GitHub
Use when changing the ignore rules that decide what may enter history (any .gitignore, a new credential or packaging class, a question about what git add would stage), or when copying another project tree into this repository. Keeps packaging, credentials and customer data out of a history that cannot forget.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-coordinationSkill
- api-code-generationSkill
- api-test-generationSkill
- ci-cd-changeSkill
- frontend-changeSkill
- guidance-maintenanceSkill
- infrastructure-changeSkill
- refactoringSkill
- secret-and-pii-handlingSkill
- secure-api-endpointSkill
- tenant-safe-changeSkill
- agent-coordinationSkill
- api-code-generationSkill
- api-test-generationSkill
- ci-cd-changeSkill
- frontend-changeSkill
- guidance-maintenanceSkill
- infrastructure-changeSkill
- refactoringSkill
- secret-and-pii-handlingSkill
- secure-api-endpointSkill
- tenant-safe-changeSkill
- workspace-importSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Assert both directions: After any ignore-file edit, the assertions must say what must be ignored and the neighbouring file that must stay …
- Very specific: line 29
Use / for a pattern meant to match at any depth.
- Distinctive: line 54
Never commit intending to clean up afterwards: the cleanup cannot reach history.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workspace import, and the ignore rules that make it safe
Required context
.agents/guardrails/repo-hygiene.md: what may enter history, and why..agents/guardrails/imports.md: the import procedure..agents/guardrails/git-safety.md: version identity and tags..agents/rules/gitignore-anchoring.md: applies with every ignore file..agents/rules/areas-manifest.md: an imported tree becomes a declared area.
The facts behind every rule here
A commit object keeps what it is given, and git rm does not remove a file from history. An
imported project typically carries far more packaging than content (dependency directories, build
output, caches, uploaded media), and often a credential file or two. Getting the ignore rules wrong
once is permanent unless history is rewritten, which is its own escalation.
The ignore rules: the everyday case
- Assert both directions. After any ignore-file edit, the assertions must say what must be
ignored and the neighbouring file that must stay tracked. A rule without an assertion is a
rule nobody will notice breaking (
docs/decisions/0005-every-gate-has-an-assertion-suite.md). - Anchoring: a slash anywhere but the end anchors the pattern to its own file's directory.
Use
**/for a pattern meant to match at any depth. - Negations need the parent included. Git cannot re-include a file whose parent directory is excluded; exclude the directory's contents, then negate the keeper.
- New credential classes go in the root ignore file, never only a sub-project's.
- Do not rely on a personal global excludes file. It does not travel to another machine, a container or CI.
tools/preflight-init.shis read-only: it reports whatgit addwould stage and refuses on credential shapes. Gigabytes in its report means an exclude failed.
An import: the rare case
Escalate first. An import is high-risk. Confirm with the operator in the current conversation before starting; an approval never carries forward from a previous import.
The order, never reordered:
- Ignore-rule assertions green before anything is copied.
- Copy with an explicit exclude list (for example
rsyncwith excludes). Never a bare recursive copy of everything. Keep the imported tree's own ignore files: they are additional layers. tools/preflight-init.sh: the staged size should match the content you expect, not the packaging. Gigabytes means an exclude failed: fix the rules and re-run.- Assertions again, then
tools/check-areas.sh. - Declare the area in
.agents/areas.json, add its node toknowledge-graph/workspace.jsonld, commit.
Never commit intending to clean up afterwards: the cleanup cannot reach history.
Tags are repository-global. A git describe --match glob searches the whole repository. An
imported product's tags can outrank another product's release and silently become its version.
Namespace tags per product, and never create a tag as a side effect of an import.
Hand off. An imported tree may carry its own agent guidance. It stays authoritative inside that tree; this repository's guidance points at it rather than restating it.
Verify
tools/preflight-init.sh # what would be staged; refuses on credential shapes
tools/check-secrets.sh
tools/check-areas.sh
make test-gates # includes the preflight tool's own suiteReviewer: repo-hygiene-reviewer; security-data-reviewer when credentials are involved.
Escalate when
- Any import, before it starts.
- Anything already committed needs removing from history.
- A tag would be created, moved or deleted.
- The preflight report is far larger than the content you meant to add.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

