Skip to content

feat: add use_skill_implement_issue()#22

Merged
jonthegeek merged 4 commits intomainfrom
copilot/add-use-skill-implement-issue-function
Mar 22, 2026
Merged

feat: add use_skill_implement_issue()#22
jonthegeek merged 4 commits intomainfrom
copilot/add-use-skill-implement-issue-function

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Adds use_skill_implement_issue(), the single-call installer for the implement-issue skill, consistent with the pattern established by use_skill_document() and use_skill_tdd_workflow().

Changes

  • R/use_skill_implement_issue.R — new exported function; delegates entirely to .use_skill("implement-issue", ...) and returns the installed path invisibly
  • inst/templates/skills/implement-issue/SKILL.md — verbatim copy of .github/skills/implement-issue/SKILL.md (no whisker variables)
  • man/use_skill_implement_issue.Rd — generated docs
  • tests/testthat/test-use_skill_implement_issue.R — verifies correct install path and invisible return

Usage

use_skill_implement_issue()
#> ✔ Writing '.github/skills/implement-issue/SKILL.md'
Original prompt

This section details on the original issue you should resolve

<issue_title>feat: use_skill_implement_issue()</issue_title>
<issue_description>## Summary

As a package developer, in order to give AI agents accurate end-to-end
guidance for implementing GitHub issues in my package, I would like to
install a pkgskills implement-issue skill with a single function call.

Proposed signature

use_skill_implement_issue(
  target_dir = ".github",
  use_skills_subdir = TRUE,
  overwrite = TRUE,
  open = rlang::is_interactive()
)

Arguments

All arguments for use_skill_implement_issue() are already defined in
@R/aaa-shared_params.R.

  • target_dir (character(1)) — Directory where the skill will be installed,
    relative to the project root. Defaults to ".github".
  • use_skills_subdir (logical(1)) — Whether to place the implement-issue
    folder under a skills subdirectory of target_dir. Defaults to TRUE,
    producing .github/skills/implement-issue/SKILL.md.
  • overwrite (logical(1)) — Whether to overwrite an existing skill file.
    Defaults to TRUE.
  • open (logical(1)) — Whether to open the installed skill file in the
    editor after creation. Defaults to rlang::is_interactive().

Returns the path to the installed skill file, invisibly (following the
usethis convention and the convention in use_skill_create_issue()).

Behavior

  • Validates all arguments using stbl (following the r-code skill
    conventions). Arguments only need to be validated once; things passed to
    .use_skill() without modification should be validated there.
  • Calls .use_skill() to install the skill.
  • Returns the installed skill file path invisibly.

Under the hood, use_skill_implement_issue() delegates to .use_skill():

.use_skill(
  "implement-issue",
  target_dir = target_dir,
  use_skills_subdir = use_skills_subdir,
  overwrite = overwrite,
  open = open
)

Details

  • Create inst/templates/skills/implement-issue/SKILL.md: a copy of
    .github/skills/implement-issue/SKILL.md. The file has no whisker template
    variables.
  • Create R/use_skill_implement_issue.R containing
    use_skill_implement_issue().

References

  • use_skill_document() in @R/use_skill_document.R — model for this function;
    use_skill_implement_issue() has the same structure but without the
    aaa-shared_params.R bootstrap step.
  • .use_skill() in @R/use_skill.R — core implementation for installing skills.
  • Existing .github/skills/implement-issue/SKILL.md — source for the template.
    EOF 2>&1</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: jonthegeek <33983824+jonthegeek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/api2r/pkgskills/sessions/789f1d81-1bb1-49a2-8b81-0f1da15927d0
Copilot AI changed the title [WIP] Add use_skill_implement_issue function for pkgskills feat: add use_skill_implement_issue() Mar 20, 2026
Copilot AI requested a review from jonthegeek March 20, 2026 19:22
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jonthegeek
Copy link
Copy Markdown
Contributor

@copilot Resolve conflicts in NAMESPACE and NEWS.md to allow this to merge to main.

The tests in tests/testthat/test-use_skill_implement_issue.R should reference "(#18)" at the end of the test description (see other test files for examples).

Update NEWS.md to reference #18, not #12, since this PR addresses issue #18, not #12.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 22, 2026

@copilot Resolve conflicts in NAMESPACE and NEWS.md to allow this to merge to main.

The tests in tests/testthat/test-use_skill_implement_issue.R should reference "(#18)" at the ...

Done in df95c0e — merged main to resolve the NAMESPACE and NEWS.md conflicts, updated the NEWS.md bullet to reference #18, and added (#18) to both test descriptions.

Copy link
Copy Markdown
Contributor

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

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

Strong work!

@jonthegeek jonthegeek marked this pull request as ready for review March 22, 2026 16:20
@jonthegeek jonthegeek enabled auto-merge (squash) March 22, 2026 16:20
@jonthegeek jonthegeek merged commit 30d2625 into main Mar 22, 2026
10 checks passed
@jonthegeek jonthegeek deleted the copilot/add-use-skill-implement-issue-function branch March 22, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: use_skill_implement_issue()

2 participants