fusion-infra-cli
Skill2 starsChanged 2 months agoMITView on GitHub
Provision and migrate Fusion databases using the fusion-infra-cli (finf). USE FOR: provision a database for a service, run SQL migrations, provision PR-specific ephemeral databases, check database state. DO NOT USE FOR: application code changes, service deployments, role management, or infrastructure other than databases.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- caveman-compressSkill
- fusion-core-servicesSkill
- fusion-dependency-reviewSkill
- fusion-designSkill
- fusion-framework-mockingSkill
- fusion-framework-testingSkill
- fusion-github-review-resolutionSkill
- fusion-issue-solvingSkill
- fusion-issue-task-planningSkill
- fusion-mcpSkill
- fusion-package-scribeSkill
- fusion-pm-mcpSkill
- fusion-backend-devSkill
- fusion-developer-appSkill
- fusion-developer-portalSkill
- fusion-devtoolsSkill
- fusion-help-apiSkill
- fusion-help-docsSkill
- fusion-help-integrationSkill
- fusion-issue-authoringSkill
- fusion-roles-cliSkill
- fusion-rulesSkill
- fusion-skill-authoringSkill
- fusionSkill
- fusion-skillsSkill
- equinor-design-systemSkill
- fusion-code-conventionsSkill
- fusion-researchSkill
- fusion-rule-authorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use when a Fusion service database needs to be provisioned or migrated — locally during development or inside CI/CD pipelines.
- Distinctive: line 133
After provisioning, apply SQL migrations:
- Very specific: line 170
Always use --verbose in pipelines to get diagnostic output
- Very specific: line 171
Always save output with -o response.json so pipeline steps can reference the result
- Very specific: line 173
Never pass raw tokens in pipeline YAML — use secret variables and pass via -t
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Fusion Infra CLI
When to use
Use when a Fusion service database needs to be provisioned or migrated — locally during development or inside CI/CD pipelines.
Typical triggers:
- "Provision the database for the context service"
- "Run migrations on the QA database"
- "Set up a PR database for this pull request"
- "What does the database provision config look like?"
- "The pipeline is failing on the database provision step"
- "Create a PR database that copies from CI"
When not to use
- Application code or service changes — use the service repo
- Role or permission management — use
fusion-roles-cli - Infrastructure other than databases (networking, storage, etc.)
- Kubernetes or container management
Prerequisites
Install finf as a .NET global tool:
dotnet tool install --global \
--add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" \
Fusion.Infra.CliUpdate to latest:
dotnet tool update --global \
--add-source "https://statoil-proview.pkgs.visualstudio.com/Fusion%20-%20Packages/_packaging/Fusion-Public/nuget/v3/index.json" \
Fusion.Infra.CliAuth uses DefaultAzureCredential automatically (picks up az login session). Pass -t <token> to override.
Core workflow — provision a database
1. Create the provisioning config file
The config file defines the database resource. Minimal example (db-config.json):
{
"name": "my-service",
"environment": "ci"
}Full config with SQL permissions:
{
"name": "my-service",
"environment": "fqa",
"sqlPermission": {
"owners": [
{ "clientId": "<app-registration-client-id>" }
],
"contributors": [
{ "clientId": "<app-registration-client-id>" }
]
}
}See references/db-config-schema.md for the full schema.
2. Run provisioning
CI / non-production:
finf database provision -f db-config.json -e ci \
--sql-owner-client-id <client-id> \
--sql-contributor-client-id <client-id> \
-o response.json --verboseQA:
finf database provision -f db-config.json -e fqa \
--sql-owner-client-id <client-id> \
--sql-contributor-client-id <client-id> \
-o response.json --verboseProduction (add --production flag):
finf database provision -f db-config.json -e fprd \
--production \
--sql-owner-client-id <client-id> \
--sql-contributor-client-id <client-id> \
-o response.json --verbosePull Request (ephemeral database, copies from CI):
finf database provision -f db-config.json \
-e pr -pr <pr-number> -ghr "equinor/my-repo" -c ci \
--sql-owner-client-id <client-id> \
--sql-contributor-client-id <client-id> \
--timeout 500 -o response.json --verbose3. Run migrations
After provisioning, apply SQL migrations:
# Non-production
finf database migrate -d sql-myservice-fqa -m migrations/ \
-o migrations.json --verbose
# Production
finf database migrate -d sql-myservice-fprd -m migrations/ \
--production -o migrations.json --verboseThe -m flag accepts a directory of .sql files or a single .sql file.
Environments
| Key | Purpose |
ci | Continuous integration |
fqa | QA / pre-production |
fprd | Production (requires --production flag) |
pr | Pull request ephemeral (requires -pr and -ghr) |
Full reference
For complete flag reference, run:
finf database provision --help
finf database migrate --helpOr see the source documentation:
Safety
- Always use
--verbosein pipelines to get diagnostic output - Always save output with
-o response.jsonso pipeline steps can reference the result - The
--productionflag is an explicit guard — never omit it forfprdprovisioning - Never pass raw tokens in pipeline YAML — use secret variables and pass via
-t database deleteis irreversible for non-PR databases — confirm with user before running
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.

