validate-app
Skill17 starsChanged 32 days agoMITView on GitHub
The pass/fail check that must be clean before an app ships. Runs `streamsnow validate-app <slug>` (required-files, manifest, artifacts, naming, schema-refs, app-security, bind-predicates, sql-tokens, session-fallback, page-imports, caching, path-leaks, the §11 requirements contract, the offline sql-review check of the app's sql_review/ files, whose coverage severity follows sql_review.coverage in config, and placeholders) and explains how to fix anything that fails. Use when the user says "validate", "is this ready", "check my app", or before /ship-app.
In this repository9 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- releaseSkill
- build-appSkill
- migrate-appSkill
- onboardSkill
- preview-appSkill
- review-appSkill
- ship-appSkill
- sql-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Run the pass/fail gate on one app and report exactly what fails and how to fix it.
- Very specific: line 22
schema-refs: no reference into a governance.schema_deny schema (exact read_exceptions aside).
- Very specific: line 23
app-security: no network egress, code execution, write SQL or string-built SQL.
- Very specific: line 33
path-leaks: no personal home-directory paths in .py or .md files.
- Very specific: line 37
placeholders: no scaffold YOUR_TABLE or starter sample block.
≈ “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
/validate-app
Repo overlay: if
.streamsnow/overlays/validate-app.mdexists in this repo, read it first: committed, repo-specific additions/overrides (_shared/overlays.md). Outside Claude Code, also read _shared/other-agents.md.
Run the pass/fail gate on one app and report exactly what fails and how to fix it. streamsnow
validate-app <slug> is the single source of truth: offline (no Snowflake, no network), deterministic,
and what CI runs per app. CI also runs dependency-vulns and tombstones; pre-commit runs a subset.
What it covers
Names as the gate prints them. How to fix each: fixing-checks.md.
- required-files, manifest, artifacts, naming: the runtime's files exist,
snowflake.ymlis valid for that runtime, itsartifacts:list matches disk, and the slug is lowercase-hyphenated. - schema-refs: no reference into a
governance.schema_denyschema (exactread_exceptionsaside). Names outsidegovernance.sourcesand app data, and two-partSCHEMA.OBJECTnames, are warnings undergovernance.boundary: warnand failures underenforce. - app-security: no network egress, code execution, write SQL or string-built SQL. Apps are
read-only by contract; maintained DDL in
sql_review/app_specific_reporting_objects/is exempt. Arender_sqltoken built from a non-constant value is atoken-sqlwarning (not yet a failure). - bind-predicates: none of the
:N IS NULL ORdeployed-driver trap. - sql-tokens: no
{TOKEN}placeholders inside SQL comments. - session-fallback:
get_active_session()sits in a broadtry/except. - page-imports: subdirectory helpers (
pages/_layout.py,pages/_data.py) imported package-qualified, since only the app root is onsys.pathdeployed. A local boot and a full UI walkthrough cannot catch this, which is the whole reason it's static. - caching: data-fetching functions carry
@st.cache_data(ttl=...). - path-leaks: no personal home-directory paths in
.pyor.mdfiles. - requirements: the §11 Build Progress block in
REQUIREMENTS.mdthat/build-appresumes from. - sql-review (coverage policy: warn|fail): the offline
streamsnow sql-review checkofsql_review/. Coverage gates only undersql_review.coverage: fail;advisorynever gates. - placeholders: no scaffold
YOUR_TABLEor starter sample block. A fresh scaffold fails it on purpose. starter-text only warns (!): an appAGENTS.mdstill describing the starter, or a repo README Apps table with no row for the app.
Steps
- Resolve the slug (list
apps/*/and ask if omitted). - Run it:
streamsnow validate-app <slug>; read its output, don't re-derive the checks (--format jsonto parse; match the sql-review entry by itssql-reviewname prefix). - PASS → report per check. A
!mark with~lines is a PASS carrying sql-review warnings (uncovered pages or queries, advisories): report them, never call the app clean./build-appneeds zero coverage warnings when its build phase ends. - On FAIL, the gate already prints
file:line, up to 10 per check. Past that, re-run the focused check:streamsnow check schema-refs|security|caching|bind-predicates|artifacts|sql-tokens|page-imports|path-leaks|requirements apps/<slug>,streamsnow check session-fallback --all apps/<slug>, orstreamsnow sql-review check <slug>. required-files, manifest, naming and placeholders have no sub-check: cite what the gate named. - Fix per fixing-checks.md: apply only mechanical, unambiguous fixes; surface judgment calls to the user rather than guessing.
- Re-run until PASS (or the only remaining failures are documented human deferrals), then report a terse per-check summary.
Gotchas
- Per-app, deterministic, offline: it catches contract violations, not slow SQL, wrong numbers
or awkward UI. Quality is
/review-app; numbers against live Snowflake are/sql-review. - Never "fix" by weakening governance. Editing the deny list, deleting a check, or string-escaping past the dynamic-SQL rule is a regression. Route through governance sources, parameterize, or remove the capability.
- Local PASS is necessary, not final: CI is authoritative and re-runs after push.
- Trust the aggregate for the verdict. A focused check can pass while the gate fails: four checks
exist only in the gate,
session-fallbackdefaults to new calls only, andsql-review checkreads the coverage policy from the repo's config rather than--config.
Troubleshooting
no app at apps/<slug>(exit 2): the slug must be a directory underapps/; run from the repo root or pass--dir(and--config <path>when the config is elsewhere). An ungoverned repo is an/onboardproblem, not a validate problem.- Schema looks allowed but fails: a denied schema fails whatever the boundary. A bare deny entry (
RAW) blocks every database, a qualified one (FINANCE.RAW) only its own; a three-part name outside the sources fails only undergovernance.boundary: enforce. Quoted names keep their case:"analytics_db"."reporting"is not the sourceANALYTICS_DB.REPORTING. - Checks disagree with reality after a config change: the gate reads config live, so re-run it.
Optional UI smoke
The gate can't see a page that fails to render: add (never substitute) a walkthrough per
_shared/playwright-walkthrough.md. A clean walkthrough is no evidence against page-imports.
Done when
The gate exits PASS on every check, or each remaining FAIL is handed back with a specific, named
reason. Hand-offs: a sql-review fix that needs real sample values or new index.yaml entries →
/sql-review <slug> --offline (inside /build-app, its build step owns index.yaml); quality depth →
/review-app; see it render → /preview-app; PASS → /ship-app, or back to /build-app when it called.
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.

