Skip to content

fix(skills): Fixed incomplete file imports during skill import.#1576

Merged
xieyxclack merged 1 commit intoagentscope-ai:mainfrom
lalaliat:la/dev/fix_skill_import_missing
Mar 16, 2026
Merged

fix(skills): Fixed incomplete file imports during skill import.#1576
xieyxclack merged 1 commit intoagentscope-ai:mainfrom
lalaliat:la/dev/fix_skill_import_missing

Conversation

@lalaliat
Copy link
Collaborator

Description

[Describe what this PR does and why]

Related Issue: Fixes #(issue_number) or Relates to #(issue_number)

Security Considerations: [If applicable, e.g. channel auth, env/config handling]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Core / Backend (app, agents, config, providers, utils, local_models)
  • Console (frontend web UI)
  • Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
  • Skills
  • CLI
  • Documentation (website)
  • Tests
  • CI/CD
  • Scripts / Deploy

Checklist

  • I ran pre-commit run --all-files locally and it passes
  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran tests locally (pytest or as relevant) and they pass
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Local Verification Evidence

pre-commit run --all-files
# paste summary result

pytest
# paste summary result

Additional Notes

[Optional: any other context]

@lalaliat lalaliat temporarily deployed to maintainer-approved March 16, 2026 08:33 — with GitHub Actions Inactive
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a bug where skill imports were incomplete due to overly restrictive file collection logic. The changes broaden the scope of files gathered from GitHub repositories during skill import, ensuring that all relevant components of a skill are included. This fix improves the reliability and completeness of skill integration within the system.

Highlights

  • Improved Skill File Collection: The logic for collecting skill files from GitHub repositories has been enhanced by removing the restrictive filtering for 'references/' and 'scripts/' subdirectories. This ensures that all necessary files within a skill's root directory are imported, resolving issues with incomplete skill imports.
  • Refactored GitHub API Path Construction: The _github_get_dir_entries function was updated to correctly construct the GitHub API content URL when the target path is empty, ensuring proper directory listing from the repository's root.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/copaw/agents/skills_hub.py
    • Refactored _github_get_dir_entries to correctly handle root path requests for GitHub API content.
    • Removed the subdir parameter from _github_collect_tree_files to simplify directory traversal.
    • Eliminated restrictive file path filtering within _github_collect_tree_files, allowing all relevant skill files to be collected.
    • Updated calls to _github_collect_tree_files in _fetch_bundle_from_skills_sh_url and _fetch_bundle_from_repo_and_skill_hint to align with the modified signature.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue with incomplete file imports for skills from GitHub. The changes correctly refactor the file collection logic to recursively fetch all files within a skill's root directory, instead of being limited to the references and scripts subdirectories. This makes the import process more robust and complete. The implementation is sound and also simplifies the calling functions. I have one minor suggestion for code simplification.

@xieyxclack xieyxclack merged commit 8bf89fc into agentscope-ai:main Mar 16, 2026
25 checks passed
hh0592821 pushed a commit to hh0592821/CoPaw that referenced this pull request Mar 19, 2026
Co-authored-by: 料料 <la414263@alibaba-inc.com>
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.

[Question]: 在skill界面导入新技能时缺失文件

2 participants