agentleFS
stackqlstackql/stackql-skills/skills/scaffold-stack/SKILL.md

scaffold-stack

Skill0 starsChanged 8 months agoMITView on GitHub

Generate a stackql-deploy stack with a stackql_manifest.yml and .iql resource files for provisioning cloud infrastructure. Accepts a description of the desired infrastructure or a specific provider and resources to provision.

  • Installs packages

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these steps in order.

    line 16
  2. Distinctive:

    If the input is vague, ask clarifying questions:

    line 25
  3. Very specific:

    If not found, delegate to /stackql-skills:install-stackql.

    line 37
  4. Distinctive:

    Check if the required provider is pulled:

    line 39
  5. Very specific:

    If not, delegate to /stackql-skills:pull-provider <provider>.

    line 45
  6. Distinctive:

    Use this to understand:

    line 56
  7. Distinctive:

    Ask the user where to create the stack, or use a sensible default:

    line 63
  8. Distinctive:

    Create the manifest file following the stackql-deploy format:

    line 76
  9. Very specific:

    Use Jinja2 template syntax ({{ var }}) for parameterized values

    line 101
  10. Very specific:

    Use globals for shared configuration like tags and environment

    line 104
  11. Distinctive:

    Use the schema from Step 3 to populate the correct field names and required parameters.

    line 137
  12. Distinctive:

    If the stack uses template variables, create an example variables file:

    line 141

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are helping the user create a new stackql-deploy stack for provisioning cloud infrastructure.

Input: $@

Follow these steps in order.

Step 1 - Understand the requirements

Parse the user's input to determine:

  • Which cloud provider(s) are involved (google, aws, azure, etc.)
  • What resources need to be provisioned
  • Any specific configuration requirements mentioned

If the input is vague, ask clarifying questions:

  • Which cloud provider?
  • What region/zone?
  • What specific resources? (e.g., VPC, subnets, compute instances, storage buckets)
  • Any naming conventions or project/subscription context?

Step 2 - Check StackQL is installed and providers are available

command -v stackql

If not found, delegate to /stackql-skills:install-stackql.

Check if the required provider is pulled:

stackql exec "SHOW PROVIDERS;" --output json

If not, delegate to /stackql-skills:pull-provider <provider>.

Step 3 - Discover resource schemas

For each resource the user wants to provision, get the schema:

stackql exec "DESCRIBE <provider>.<service>.<resource>;" --output json
stackql exec "SHOW METHODS IN <provider>.<service>.<resource>;" --output json

Use this to understand:

  • What fields are available for INSERT (createorupdate methods)
  • What fields are required
  • What identifiers are needed for SELECT (to verify deployment)

Step 4 - Determine stack directory

Ask the user where to create the stack, or use a sensible default:

<stack-name>/
  stackql_manifest.yml
  resources/
    <resource1>.iql
    <resource2>.iql
    ...

Step 5 - Generate the stackql_manifest.yml

Create the manifest file following the stackql-deploy format:

version: 2
name: <stack-name>
description: <description>
providers:
  - <provider>
globals:
  - name: global_tags
    value:
      managed_by: stackql-deploy
      environment: "{{ environment }}"

resources:
  - name: <resource-name>
    description: <resource description>
    props:
      - name: <prop-name>
        value: <value or "{{ var }}">
    exports:
      - <exported-field>

Key manifest conventions:

  • Use Jinja2 template syntax ({{ var }}) for parameterized values
  • Group related resources logically
  • Define exports for values that downstream resources need
  • Use globals for shared configuration like tags and environment

Step 6 - Generate .iql resource files

For each resource in the manifest, create the corresponding .iql files. Each resource typically needs:

resources/<resource-name>.iql - Contains the StackQL queries for build, test, and teardown:

/*+ build */
INSERT INTO <provider>.<service>.<resource> (
  <field1>,
  <field2>,
  ...
)
SELECT
  '{{ prop1 }}',
  '{{ prop2 }}',
  ...
;

/*+ test */
SELECT count(*) as count
FROM <provider>.<service>.<resource>
WHERE <identifier> = '{{ resource_name }}'
AND <required_param> = '{{ param }}';

/*+ teardown */
DELETE FROM <provider>.<service>.<resource>
WHERE <identifier> = '{{ resource_name }}'
AND <required_param> = '{{ param }}';

Use the schema from Step 3 to populate the correct field names and required parameters.

Step 7 - Generate a variables file (optional)

If the stack uses template variables, create an example variables file:

vars/dev.jsonnet or vars/dev.json:

{
  "environment": "dev",
  "project": "my-project",
  "region": "us-central1"
}

Step 8 - Report

Summarize what was created:

  • List all files generated
  • Explain the stack structure
  • Provide the commands to deploy:

To deploy this stack:

pip install stackql-deploy  # if not installed
stackql-deploy build <stack-name> dev --env-file vars/dev.json

To test the deployment:

stackql-deploy test <stack-name> dev --env-file vars/dev.json

To tear down:

stackql-deploy teardown <stack-name> dev --env-file vars/dev.json

Suggest reviewing the generated files and customizing values before deploying.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.