Skip to content

Add composable Nix skill packages - #667

Open
mpscholten wants to merge 2 commits into
masterfrom
2026-08-28-d01006a4
Open

Add composable Nix skill packages#667
mpscholten wants to merge 2 commits into
masterfrom
2026-08-28-d01006a4

Conversation

@mpscholten

@mpscholten mpscholten commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • add reusable mkSkill and mkSkillBundle Nix helpers, exposed through flake.lib.skillsFor
  • expose the complete built-in bundle as packages.<system>.skills and individual skills as separate flake packages
  • fetch Intercom's attach-github-assets skill from a pinned 2x-skills revision and fixed hash
  • apply a small harness-compatibility patch during the Nix build instead of vendoring upstream files
  • discover additional built-in skill roots through HASKELL_AGENT_BUILTIN_SKILLS
  • document composition from NixOS and nix-darwin configurations
  • keep skills entirely outside Cabal data files and the source checkout

Upstream: https://github.com/intercom/2x-skills/tree/main/plugins/pr-tools/skills/attach-github-assets

Validation

  • nix flake show --no-write-lock-file
  • nix build .#skills .#skills-attach-github-assets --no-link
  • nix build .#checks.aarch64-darwin.agent-cli --no-link
  • printf ':main --match "GitHub asset attachment"\\n:q\\n' | nix develop -c cabal repl agent-cli:test:agent-cli-test

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +31 to +32
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 "")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mpscholten
mpscholten force-pushed the 2026-08-28-d01006a4 branch from 478486b to 1e51cef Compare August 28, 2026 08:20
@mpscholten mpscholten changed the title Add GitHub asset attachment skill Aug 28, 2026
@mpscholten
mpscholten force-pushed the 2026-08-28-d01006a4 branch from 1e51cef to 55cd81f Compare August 28, 2026 08:30
@srid

srid commented Aug 28, 2026

Copy link
Copy Markdown
@mpscholten

Copy link
Copy Markdown
Member Author

thx for sharing, looks useful, I'll take a look 👍

@mpscholten
mpscholten force-pushed the 2026-08-28-d01006a4 branch from 0c13957 to 90c7c17 Compare August 31, 2026 09:30
@mpscholten mpscholten changed the title Add Nix-fetched GitHub asset attachment skill Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants