Add composable Nix skill packages - #667
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 478486be06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,93 @@ | |||
| #!/bin/bash | |||
| # Usage: ./upload.sh <file-path> [repository_id] | |||
| # Requires: gh, curl, jq | |||
There was a problem hiding this comment.
Package the helper's required command-line tools
When users run the packaged Nix application or enter its development shell without ambient installations of these commands, every upload fails with gh, curl, or jq not found. I checked the agentCliExecutable PATH wrapper and devShells.default.nativeBuildInputs in flake.nix; neither provides these newly required tools, so the built-in skill is not self-contained in the project's primary distribution environment. Add them to the runtime wrapper and development shell inputs.
Useful? React with 👍 / 👎.
| OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's#(git@github\.com:|https://github\.com/)##; s#\.git$##') | ||
| REPO_ID=$(gh api "repos/$OWNER_REPO" --jq '.id' 2>/dev/null || echo "") |
There was a problem hiding this comment.
Handle URI-style SSH remotes before calling gh
When origin uses the valid URI-style SSH form ssh://git@github.com/owner/repo.git, this substitution leaves OWNER_REPO as ssh://git@github.com/owner/repo. The subsequent call therefore passes repos/ssh://git@github.com/owner/repo to gh api; its help specifies that the endpoint must be a GitHub API v3 path, so automatic repository detection fails even though the checkout has an ordinary GitHub remote. Parse both SCP-style and URI-style SSH URLs, or let gh resolve the current repository.
Useful? React with 👍 / 👎.
478486b to
1e51cef
Compare
1e51cef to
55cd81f
Compare
|
Tangential, I just created this: https://github.com/juspay/saatchi#publishing-the-shots |
|
thx for sharing, looks useful, I'll take a look 👍 |
0c13957 to
90c7c17
Compare
Summary
mkSkillandmkSkillBundleNix helpers, exposed throughflake.lib.skillsForpackages.<system>.skillsand individual skills as separate flake packagesattach-github-assetsskill from a pinned2x-skillsrevision and fixed hashHASKELL_AGENT_BUILTIN_SKILLSUpstream: https://github.com/intercom/2x-skills/tree/main/plugins/pr-tools/skills/attach-github-assets
Validation
nix flake show --no-write-lock-filenix build .#skills .#skills-attach-github-assets --no-linknix build .#checks.aarch64-darwin.agent-cli --no-linkprintf ':main --match "GitHub asset attachment"\\n:q\\n' | nix develop -c cabal repl agent-cli:test:agent-cli-test