Fn fpk builder skill
Build, validate, inspect, release, install, replace, troubleshoot, and safely remove fnOS/飞牛 OS FPK application packages. Use when Codex works with fnpack, appcenter-cli, .fpk archives, fnOS manifests, native or Docker app templates, x86_64/ARM64 packaging, GitHub Actions release pipelines, or SSH-based deployment and smoke testing on a fnOS device.From its SKILL.md
npx -y skills add kci-lnk/fn-fpk-builder-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.3 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it
fnOS FPK Builder
Create evidence-backed fnOS packages without modifying the source project in place. Prefer the bundled Python tools for fragile archive, architecture, checksum, and remote lifecycle operations.
Resolve the directory containing this SKILL.md as SKILL_DIR before running bundled tools. The user's working directory is normally an application repository, so never assume scripts/ resolves to this Skill:
SKILL_DIR=/absolute/path/to/fn-fpk-builder-skill
python3 "$SKILL_DIR/scripts/fpk.py" --help
Route the request
- Read references/official-contract.md before creating or changing an fnOS package structure, manifest, lifecycle script, wizard, privilege, resource, UI entry, CGI, or gateway configuration.
- Read references/build-and-architecture.md before cross-building, applying architecture overlays, choosing
platform, or packaging Go, Rust, Node, Python, Docker, or other native dependencies. - Read references/ci-release.md before authoring or changing release automation. Start from
assets/github-actions/fpk.ymlwhen it fits the project. - Read references/remote-testing.md before connecting to a device, installing, replacing, rolling back, collecting logs, or running smoke tests.
- Read references/security.md before accepting root privilege, CGI/gateway exposure, secrets, symlinks, or unusual archive content.
- Read references/troubleshooting.md only when a command, build, install, start, or validation step fails.
Follow the core workflow
-
Inspect the repository and find the package root, existing build commands, prepared artifacts, target architectures, and release conventions. Do not assume a language or monorepo layout.
-
Run environment and project diagnostics:
python3 "$SKILL_DIR/scripts/fpk.py" doctor --project /absolute/path/to/package -
Build application binaries with the project's own locked build commands. Do not invent or silently execute an arbitrary prebuild shell command.
-
Put architecture-specific files in explicit overlay directories when the common package tree cannot already be built per architecture.
-
Build in isolated staging:
python3 "$SKILL_DIR/scripts/fpk.py" build \ --project /absolute/path/to/package \ --out /absolute/path/to/dist \ --arch both \ --overlay-amd64 /absolute/path/to/amd64-overlay \ --overlay-arm64 /absolute/path/to/arm64-overlay -
Inspect every final artifact independently:
python3 "$SKILL_DIR/scripts/fpk.py" inspect /absolute/path/to/app.fpk -
Deploy only when the user authorized the target device and application. Diagnose the remote first, then use the lifecycle wrapper:
python3 "$SKILL_DIR/scripts/fnos.py" doctor --host root@fnos-host python3 "$SKILL_DIR/scripts/fnos.py" deploy --host root@fnos-host /absolute/path/to/app.fpk -
Report exact artifacts, SHA-256 values, target architecture, commands run, validations performed, remote status, and any skipped evidence.
Use --json on every command when results need to be consumed by an agent or CI.
Enforce safety invariants
- Treat official fnOS documentation as the behavioral authority. Treat repository scripts and device observations as implementation evidence, not universal API guarantees.
- Pin and verify
fnpack. Never replace a failed checksum with an observed value. - Use
platform=allonly when the payload contains no architecture-specific native executable or library. Build separatex86andarmpackages otherwise. - Reject path traversal, absolute paths, unsafe links, duplicate archive members, Mach-O/PE binaries, mixed ELF architectures, checksum mismatch, and native binaries that contradict the target.
- Never package
.DS_Store, VCS data, private keys, credential files, or local environment files. - Stage a copy and rewrite only the staged manifest. Never mutate source manifests or prepared artifacts during packaging.
- Use fnOS runtime variables such as
TRIM_APPDEST,TRIM_PKGETC, andTRIM_PKGVAR. Use/var/apps/{appname}only as the stable installed entry point when a variable is unavailable. - Warn on root privilege and broad network/file exposure. Do not silently downgrade declared privileges.
- Never install an FPK over an installed app. For every redeploy or update, stop the target, uninstall it, verify
status=noinstall, and only then callinstall-fpk; abort if the uninstall postcondition fails. Treat--cleanonly as a deprecated compatibility flag. Require--yesfor standalone uninstall. - Never disable SSH host-key verification or print environment-file contents.
- Use a uniquely named
fpk-skill-smoke-*package for smoke tests. Never repurpose an existing application as the test fixture.
Command map
Local FPK operations:
python3 "$SKILL_DIR/scripts/fpk.py" toolchain Inspect or install the verified fnpack tool
python3 "$SKILL_DIR/scripts/fpk.py" init Create an official native or Docker project
python3 "$SKILL_DIR/scripts/fpk.py" doctor Validate host and source package readiness
python3 "$SKILL_DIR/scripts/fpk.py" build Stage, package, inspect, name, and hash FPKs
python3 "$SKILL_DIR/scripts/fpk.py" inspect Audit a project directory or final FPK
python3 "$SKILL_DIR/scripts/fpk.py" sources Show provenance or verify source content hashes
Remote fnOS operations:
python3 "$SKILL_DIR/scripts/fnos.py" doctor Inspect device architecture and CLI versions
python3 "$SKILL_DIR/scripts/fnos.py" deploy Select, upload, verify, uninstall/reinstall, and verify
python3 "$SKILL_DIR/scripts/fnos.py" status Query application status
python3 "$SKILL_DIR/scripts/fnos.py" logs Discover or tail application-owned logs
python3 "$SKILL_DIR/scripts/fnos.py" start Start an installed application
python3 "$SKILL_DIR/scripts/fnos.py" stop Stop an installed application
python3 "$SKILL_DIR/scripts/fnos.py" uninstall Explicitly remove an application
python3 "$SKILL_DIR/scripts/fnos.py" smoke Build and exercise an isolated disposable package
Run a command with --help instead of guessing an option. Exit codes are 0 for success, 1 for an operation or validation failure, and 2 for invalid arguments or an unsupported environment.
Validate changes to this skill
Run the complete local suite:
python3 -m unittest discover -s tests -v
VALIDATOR="${CODEX_SKILL_CREATOR_DIR:-$HOME/.codex/skills/.system/skill-creator}/scripts/quick_validate.py"
python3 "$VALIDATOR" .
When FNPACK_BIN points to verified fnpack 1.2.3, the integration suite must build real native and Docker fixtures. For substantial revisions, run the clean-room prompts and rubric in evals/ with fresh agents and compare them with a no-skill baseline.
What ships with it: 38 files
307.5 KB alongside SKILL.md, 21 of them executable
agents/
- openai.yaml256 B
assets/
- github-actions/fpk.yml5.8 KB
evals/
- expected-assertions.json3.0 KB
- loop-results.json5.2 KB
- prompts.json3.5 KB
- protocol.md1.1 KB
- rubric.md1.6 KB
references/
- build-and-architecture.md6.9 KB
- ci-release.md5.5 KB
- official-contract.md9.8 KB
- provenance.json4.0 KB
- remote-testing.md8.8 KB
- security.md7.2 KB
- troubleshooting.md9.1 KB
scripts/
- fnos.pyruns6.8 KB
- fpk_lib/archive.pyruns32.2 KB
- fpk_lib/binary.pyruns1.8 KB
- fpk_lib/builder.pyruns8.6 KB
- fpk_lib/ci_overlay.pyruns6.9 KB
- fpk_lib/__init__.pyruns115 B
- fpk_lib/manifest.pyruns10.8 KB
- fpk_lib/remote.pyruns35.9 KB
- fpk_lib/report.pyruns2.8 KB
- fpk_lib/smoke.pyruns11.7 KB
- fpk_lib/toolchain.pyruns8.1 KB
- fpk.pyruns18.1 KB
tests/
- helpers.pyruns7.9 KB
- __init__.pyruns38 B
- test_archive.pyruns11.8 KB
- test_builder.pyruns3.7 KB
- test_ci_overlay.pyruns2.9 KB
- test_cli_and_structure.pyruns6.3 KB
- test_manifest.pyruns4.4 KB
- test_real_fnpack.pyruns7.0 KB
- test_remote.pyruns20.6 KB
- .gitignore554 B
- LICENSE1.0 KB
- README.md26.1 KB
Gives 0 of the 12 instructions most ship operate skills give in ~1.6k tokens
Counted across 779 of the 1,178 authors here whose files we hold, read 2026-08-07
- Document a rollback plan before deploymentin 41 of 779, across 22 files
- Update the changelogin 21 of 779, across 19 files
- Run the test suitein 20 of 779
- Create an annotated git tagin 20 of 779
- Clean up feature flags after full rolloutin 18 of 779, across 10 files
- Verify deployment health after launchin 18 of 779, across 10 files
- Test both feature flag statesin 17 of 779, across 9 files
- Verify the working tree is cleanin 17 of 779
- Make database migrations backward-compatiblein 16 of 779, across 8 files
- Set up error monitoring before launchin 15 of 779, across 7 files
- Monitor metrics at each rollout stagein 14 of 779, across 5 files
- Create a GitHub releasein 14 of 779
Said here and by no other author read
- build application binaries with project locked commands
- put architecture specific files in explicit overlay directories
- build in isolated staging
- inspect every final artifact independently
- deploy only when the user authorizes it
- report exact artifacts hashes and commands run
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.