[bug] push --all skips an edited skill that pull kept after a project switch

Closed
#1,020 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #1022 by @SaulMoro — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
git, typescript
Domain
cli, tooling

Research direction

Start in src/resources/skills.ts at scanLocalForPush, where the third pass fills blockedSkills (around lines 574-583) and the continue at line 641 skips them. Check how deliveredHashes from #822 records the copy teamai wrote. The "Kept skill" warning comes from src/pull.ts at lines 347 and 1896. Done when push --all offers an edited skill back to its team path, names an ambiguous skill for --skill, and prints the warning once. Linked PR #1022 is already open against this issue, so review it before starting.

Written by the indexing model from the issue text.

Description

bug

Description

After a member changes projects, pull keeps a skill they edited and says to push it, but push --all doesn't offer it. The skill sits in an inactive namespace, so the skill scan skips it. The only way out is push --skill <path>, which the message doesn't mention.

pull (projects: svc-a → svc-b)
  a-skill was edited, so pull keeps it (#865)
  "Kept skill "a-skill" (claude): … Push or back them up, then delete it manually."   src/pull.ts:347 and :1896, both fire

push --all
  SkillsHandler.scanLocalForPush                       src/resources/skills.ts:538
    third pass: every skill in a namespace the scope doesn't select → blockedSkills   :574-583
    if (blockedSkills.has(dir)) continue                                               :641
  "No new or modified resources to push"

push --skill .claude/skills/a-skill
  → skills/svc-a/a-skill                               works

Rules don't have this gap. A kept rules/svc-a/a-rule.md is offered by push --all and goes back to rules/svc-a/a-rule.md. The difference is the local layout: a rule keeps its namespace directory, while a skill is delivered flat (.claude/skills/a-skill). The block exists so a member's own skill doesn't get read as an edit of a same-named skill in someone else's namespace.

Expected: push --all offers an edited skill back to its team path when teamai delivered that copy, as it does for rules.

Proposed fix.

  • In the skill scan, let a blocked name through when the delivery record (deliveredHashes, #822) shows teamai wrote that copy. Map it to the one inactive namespace that holds the name. A name that two inactive namespaces hold stays blocked, and push names it with --skill.
  • A local skill with no record stays blocked, as today.
  • Say the "Kept skill" warning once. Today the inactive-namespace cleanup and the Step 3b sweep both print it.

This also covers #913: a workspace delivers its children's skills, and an edit made there has to go back to the child's namespace.

Reproduction

  1. Team repo with manifest/projects.yaml (svc-a: skills: [svc-a, payments], svc-b: skills: [svc-b, payments]) and skills/svc-a/a-skill/SKILL.md. Project scope with projects: [svc-a], teamai pull.
  2. Edit .claude/skills/a-skill/SKILL.md.
  3. teamai projects set svc-b, teamai pull --force: Kept skill "a-skill" (claude): … Push or back them up, printed twice.
  4. teamai push --all: No new or modified resources to push.
  5. teamai push --all --skill .claude/skills/a-skill: to: skills/svc-a/a-skill.

Environment

  • OS: macOS 27.0
  • Node.js: v24.21.0
  • teamai: main at b69f888
  • Provider: git (local bare remote)
  • AI tool(s): Claude Code

Logs

Where it was found

Found while checking how push would behave in the workspace mode from #913. Reproduced with the built CLI in a sandbox with a local bare team repo and TEAMAI_NONINTERACTIVE=1. The branches each push created confirm the destinations. The PR step failed only because the remote was a local path.

Dominant language
TypeScript
Stars
5.7k
Forks
486
Avg merge
15h 14m
Merged PRs (30d)
429

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent/teamai-cli

All issues in Tencent/teamai-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.