AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Increase skill description limit from 200 to 250 chars (#13448)
Toran Bruce Richards9f306303b9a4
diff --git a/autogpt_platform/backend/backend/copilot/tools/skills.py b/autogpt_platform/backend/backend/copilot/tools/skills.pyindex aad6499973..a13179eaa9 100644--- a/autogpt_platform/backend/backend/copilot/tools/skills.py+++ b/autogpt_platform/backend/backend/copilot/tools/skills.py@@ -59,7 +59,7 @@ logger = logging.getLogger(__name__)# ---------------------------------------------------------------------------MAX_USER_SKILLS = 50MAX_NAME_CHARS = 64-MAX_DESCRIPTION_CHARS = 200+MAX_DESCRIPTION_CHARS = 250MAX_BODY_CHARS = 20_000# Triggers appear inline in the per-turn ``<available_skills>`` index,# so an unbounded list (or one huge trigger) would balloon the prefix@@ -926,7 +926,7 @@ class StoreSkillTool(BaseTool):},"description": {"type": "string",- "description": "One-line hook (≤200 chars).",+ "description": f"One-line hook (≤{MAX_DESCRIPTION_CHARS} chars).",},"body": {"type": "string",diff --git a/autogpt_platform/backend/backend/copilot/tools/skills_test.py b/autogpt_platform/backend/backend/copilot/tools/skills_test.pyindex bdf03d4cea..5cb10cd583 100644--- a/autogpt_platform/backend/backend/copilot/tools/skills_test.py+++ b/autogpt_platform/backend/backend/copilot/tools/skills_test.py@@ -179,7 +179,7 @@ def test_description_length_cap_enforced_by_validate_path():"""The cap is enforced inside ``StoreSkillTool._execute`` (not bythe dataclass), so this test just locks in the constant — bumpingit requires conscious thought about per-turn token cost."""- assert MAX_DESCRIPTION_CHARS == 200+ assert MAX_DESCRIPTION_CHARS == 250def test_trigger_caps_are_bounded():diff --git a/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/getSkillUploadError.test.ts b/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/getSkillUploadError.test.tsindex 47cf787952..a46f71c9d0 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/getSkillUploadError.test.ts+++ b/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/getSkillUploadError.test.ts@@ -23,7 +23,9 @@ describe("getSkillUploadError", () => {test("reports the exact length when description is too long", () => {const desc = "x".repeat(MAX_SKILL_DESCRIPTION_CHARS + 1);const err = getSkillUploadError(md(`name: ok_skill\ndescription: ${desc}`));- expect(err).toContain(`${MAX_SKILL_DESCRIPTION_CHARS + 1}/200`);+ expect(err).toContain(+ `${MAX_SKILL_DESCRIPTION_CHARS + 1}/${MAX_SKILL_DESCRIPTION_CHARS}`,+ );expect(err).toContain("trim at least 1");});diff --git a/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/main.test.tsxindex ee91685e7d..1a1eae30f0 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/main.test.tsx@@ -283,7 +283,7 @@ describe("SkillsPage", () => {await screen.findByTestId("skills-empty");const input = screen.getByTestId("skill-upload-input");- const longDescription = "x".repeat(201);+ const longDescription = "x".repeat(251);const file = new File([`---\nname: too_long\ndescription: ${longDescription}\n---\n\nbody`],"too_long.md",@@ -295,7 +295,7 @@ describe("SkillsPage", () => {expect(toastMock).toHaveBeenCalledWith(expect.objectContaining({title: "Can't upload this skill",- description: expect.stringContaining("201/200"),+ description: expect.stringContaining("251/250"),variant: "destructive",}),);diff --git a/autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/helpers.tsindex 4af769bd89..8b7f4539bc 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/helpers.ts+++ b/autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/helpers.ts@@ -1,7 +1,7 @@// Mirrors backend limits in backend/copilot/tools/skills.py — kept in sync// manually. These bound the per-turn `<available_skills>` index the copilot// sees, so the cap is deliberate (see backend MAX_DESCRIPTION_CHARS).-export const MAX_SKILL_DESCRIPTION_CHARS = 200;+export const MAX_SKILL_DESCRIPTION_CHARS = 250;const FRONTMATTER_RE = /^---\n([\s\S]*?)\n---/;