add-autocomplete

add-autocomplete is a skill for Claude Code from Guiziweb/guiziweb-plugins. It costs 29 tokens per session (1,912 once invoked), scanned A, original, MIT.

A search-as-you-type form field for choosing a Sylius resource, such as an article or product. It can also support resources whose text changes by language.

In plain words
What is it for?
Use it to select related records in admin forms, such as choosing an article for a product or finding a translated resource by its title.
Why use it?
It avoids making administrators scroll through long lists or type exact record names. It connects the searchable field to an existing admin form.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the sylius-app plugin — 11 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/guiziweb/guiziweb-plugins/add-autocomplete
Any agent
npx skills add Guiziweb/guiziweb-plugins --skill add-autocomplete
Clone the repo
git clone --depth 1 https://github.com/Guiziweb/guiziweb-plugins

Made for: Claude Code.

Or install sylius-app, the plugin that ships this one along with the rest of its 11 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-autocomplete

README.md
[![agentmods](https://agentmods.dev/badge/skills/guiziweb/guiziweb-plugins/add-autocomplete.svg)](https://agentmods.dev/skills/guiziweb/guiziweb-plugins/add-autocomplete)
Your own site
<a href="https://agentmods.dev/skills/guiziweb/guiziweb-plugins/add-autocomplete"><img src="https://agentmods.dev/badge/skills/guiziweb/guiziweb-plugins/add-autocomplete.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,912 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01912
Opus 5 $0.00015 $0.00956
Sonnet 5 $0.00006 $0.00382
Haiku 4.5 $0.00003 $0.00191

Measured 6d ago against content hash 109868968720, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

add-autocomplete scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/sylius-app/skills/add-autocomplete/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add an Autocomplete Type for a Sylius Resource

This skill is for exposing a resource as an autocomplete in a form. For a grid filter, use ux_autocomplete / ux_translatable_autocomplete directly in the grid YAML (see /sylius-app:add-grid) — no custom form type needed.

Ask the user for:

  • ModelName: the resource to make searchable (e.g. Article)
  • TargetModelName: the existing Sylius entity whose form should receive the field (e.g. Product). Optional — skip steps 3–4 if not provided.

Read src/Entity/{ModelName}/{ModelName}.php to detect the entity's fields and whether it uses TranslatableTrait.

Prerequisites: /sylius-app:add-model (and /sylius-app:add-translatable-model if applicable) must have been run first.

Key rules

For translatable entities (uses TranslatableTrait)

  • Use TranslatableAutocompleteType as parent
  • Always set entity_fields: [] in extra_options — the default is ['code'], which crashes if the entity has no code field
  • Set translation_fields to the actual translated field names (e.g. ['title'])
  • Set choice_label directly via $resolver->setDefault('choice_label', fn(Options $options) => ...) — NOT inside extra_options

For non-translatable entities

  • Use BaseEntityAutocompleteType as parent
  • Set searchable_fields via $resolver->setDefault('searchable_fields', fn(Options $options) => [...])

Always

  • Inject the model class via constructor (%app.model.{model_snake}.class%)
  • Register explicitly in services.yaml with both form.type and ux.entity_autocomplete_field tags — PHP attributes alone are not enough without autoconfigure
  • filter_query is a PHP callable — it can NOT be passed via extra_options (only scalars/arrays travel via URL). Define it inside configureOptions instead.

1. Create the AutocompleteType

Translatable entity

src/Form/Type/{ModelName}/{ModelName}AutocompleteType.php:

<?php

declare(strict_types=1);

namespace App\Form\Type\{ModelName};

use Doctrine\ORM\QueryBuilder;
use Sylius\Bundle\AdminBundle\Form\Type\TranslatableAutocompleteType;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\UX\Autocomplete\Form\AsEntityAutocompleteField;

#[AsEntityAutocompleteField(
    alias: 'app_{model_snake}',
    route: 'sylius_admin_entity_autocomplete',
)]
class {ModelName}AutocompleteType extends AbstractType
{
    public function __construct(private readonly string ${model_snake}Class)
    {
    }

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->setDefaults([
            'class' => $this->{model_snake}Class,
            'extra_options' => [
                'entity_fields' => [],                          // ⚠️ required if entity has no 'code' field
                'translation_fields' => ['{label_field}'],     // translated fields to search in
            ],
            // filter_query must be defined here — NOT via extra_options (no callables via URL)
            // 'filter_query' => function (QueryBuilder $qb, string $query, EntityRepository $repository): void {
            //     $qb->andWhere('entity.enabled = :enabled')->setParameter('enabled', true);
            // },
        ]);

        $resolver->setDefault('choice_label', function (Options $options): string {
            return $options['extra_options']['choice_label'] ?? '{label_field}';
        });
    }

    public function getBlockPrefix(): string
    {
        return 'app_{model_snake}_autocomplete';
    }

    public function getParent(): string
    {
        return TranslatableAutocompleteType::class;
    }
}

Read the full file on GitHub · 218 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 218 lines · 29 tokens per session scan A 109868968720

Subscribe to this mod's changes

add-autocomplete is a skill published in the GitHub repository Guiziweb/guiziweb-plugins (4 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,912 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens