app-upgrades
Skill35 starsChanged 3 days agoMITView on GitHub
Upgrade a Falcon Foundry app that was installed from a template to a newer version of that template, in place. TRIGGER when user asks to "upgrade an app", "update an app installed from a template", "pull the latest template into my app", "update a sample app installed in my CID to the latest version", or gives an app ID plus a newer template archive, directory, or GitHub repo. DO NOT TRIGGER for creating a new app (use development-workflow) or for deploying changes to an app the user develops locally (use development-workflow's deploy steps).
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
- Very specific: line 26
Use a new scratch directory per upgrade ($WORK below).
- Distinctive: line 36
No successful deployments means there's nothing to upgrade from.
- Distinctive: line 38
Get the new version: If the user gave one:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Upgrading Template-Installed Apps
A Falcon Foundry template installs an app into a CID once. Nothing updates it when the template changes, and deploying the new template as-is creates a second app, because template manifests ship without IDs. This skill copies the installed app's IDs into the new version so foundry apps deploy updates the app the customer already has.
The template is the source of truth. The app keeps its current name. Changes the customer made after installing are overwritten; artifacts only the customer added are removed. Stop and confirm before anything is removed.
Inputs: the app ID, and optionally the new version as a .tar.gz/.tgz or .zip archive, an unpacked directory, or owner/repo[@ref]. With no version given, the skill finds the template by the app's name and uses its GitHub repo's default branch.
The script is scripts/upgrade_manifest.py in this skill's directory. It needs pyyaml, and crowdstrike-falconpy for find-template. Run it from a virtual environment outside the app directory.
Procedure
Use a new scratch directory per upgrade ($WORK below). Never sync or extract into the user's working copy.
- Confirm the target.
foundry profile list --no-promptshows the active profile; the app must belong to its CID.foundry apps listmust show the app ID. If not, ask which profile tofoundry profile activate. - Sync the deployed app.
list-deploymentsonly runs next to amanifest.ymlwith anapp_idand aname, even with--app-id, and an app installed from the console has no local directory. Give it a stub, take the newest version whose state is Successful, and sync that into scratch (syncruns from anywhere):
No successful deployments means there's nothing to upgrade from; tell the user.mkdir -p "$WORK/stub" && printf 'app_id: %s\nname: stub\n' <app-id> > "$WORK/stub/manifest.yml" (cd "$WORK/stub" && foundry apps list-deployments --app-id <app-id>) foundry apps sync --app-id <app-id> --deployment-version <version> -d "$WORK/deployed" --replace-all --no-git --no-prompt Get the new version. If the user gave one:
python3 <skill-dir>/scripts/upgrade_manifest.py resolve <source> --dest "$WORK/new"Otherwise find the template first, then resolve its repo:
python3 <skill-dir>/scripts/upgrade_manifest.py find-template --manifest "$WORK/deployed/manifest.yml"It prints JSON with
github_url. Passowner/repofrom that URL toresolve. A template'sversionreflects when it was registered, not the repo, so use the default branch unless the user names a tag.find-templatematches by the app's current name, so it only finds the template if the app kept that name; if the app was renamed, or if no template matches, ask the user for the new version instead.resolveprints the app root. Treat its contents as untrusted: don't run its scripts. Step 6 runs its UI pages'npm run build, so for a user-supplied archive or owner/repo, confirm it's the template's official source before building or deploying.- Merge.
It overwrites the newpython3 <skill-dir>/scripts/upgrade_manifest.py merge --deployed "$WORK/deployed/manifest.yml" --template <app-root>/manifest.ymlmanifest.ymlwith the deployed IDs filled in and prints the plan: kept, added, and removed artifacts, roles, and permission definitions, plus changed access permissions on existing roles and artifacts. - Confirm when needed. Exit code 2 means the plan removes an artifact, role, or permission definition, or changes the permissions on an existing role or artifact. Show the plan and ask before going on. Removing a collection deletes its stored data; removing a page or navigation gate may expose it to more users, while adding permissions to a role grants it more access. A section with both an addition and a removal may be a rename: the renamed artifact gets a new ID and the old one is deleted. Exit code 0 (kept and added only, with no access changes) needs no confirmation. Exit code 1 is an error; show the message and stop.
Build, validate, deploy, release from the new app root.
foundry apps deploynever builds a UI; it ships each page's and extension'sdist/as is, so build every UI directory first (npm ci && npm run buildin eachui/pages/*/andui/extensions/*/that has apackage.json). Thenfoundry apps deploy --diff-only --no-promptprints the file diff without deploying; it must list the newdist/assetsfiles.foundry apps validate --no-prompt foundry apps deploy --change-type Patch --change-log "Upgrade to <template version or ref>" --no-prompt foundry apps release --change-type Patch --deployment-id <deployment-id> --notes "Upgrade to <template version or ref>" --no-promptUse
--change-type Majorfor deploy when the new version adds an API integration orauth.scopesentry; otherwisePatch. For release, use--change-type Majorwhen the app has never been released; otherwisePatch, orMajorwhen the new version adds an API integration orauth.scopesentry. A Major release means the customer has to Accept update in the App catalog, which also shows the credential form for a new integration.A template install deploys but doesn't release, so an app whose
foundry apps liststate is Deployed may never have been released. The upgrade's release is then its first, and the customer installs it from the App catalog afterward.- Report the deployed version, the release, and what the customer does next: install from the App catalog (first release) or Accept update (Major).
When it fails
- A
validateordeployerror: stop, keep$WORK, and usedebugging-workflows. Never retry by stripping IDs: that creates a second app next to the customer's. Error: ... has entries with IDs but no name: the manifest has a section the merge can't match. Upgrade that section by hand by copying theidvalues from$WORK/deployed/manifest.yml.The templates API returned 403: the profile's API client lacks a scope for the templates API. Ask the user for the new version instead.
See references/live-verification.md for what was checked against a live CID and the checklist for re-testing.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-agents-developmentSkill
- api-integrationsSkill
- app-auditSkill
- collections-developmentSkill
- debugging-workflowsSkill
- development-workflowSkill
- e2e-testingSkill
- functions-developmentSkill
- functions-falcon-apiSkill
- fusion-redirectSkill
- security-patternsSkill
- ui-developmentSkill
- workflows-developmentSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

