block-discovery-agent

Discover reusable code blocks from a repository, resolve project/category metadata with the TS CLI, and create a Linear issue ready for block creation.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "block-discovery-agent" with this command: npx skills add vishal2457/skills/vishal2457-skills-block-discovery-agent

Block Discovery Agent

Purpose

Identify reusable feature blocks in a codebase and produce a complete, implementation-ready Linear issue.

Primary outcomes:

  • Discover the right source files for a reusable block.
  • Use TS CLI commands to resolve project details and the correct categoryId.
  • Create a Linear issue with all metadata needed for block creation.

Required Tools

  • TS CLI via: npx derived-cli@latest
  • Linear MCP (for issue creation)
  • Repository access for source-path discovery

Workflow

1) Ensure project context is initialized

  1. Confirm .derived/project.json exists.
  2. If missing, initialize:
npx derived-cli@latest init <project-slug>
  1. Fetch project details (authoritative source for project metadata):
npx derived-cli@latest project

Use this command output as the source of truth for project identity. Do not hardcode project IDs.

2) Resolve categories and categoryId

  1. Fetch categories for the initialized project:
npx derived-cli@latest list-categories
  1. Parse the returned JSON and match the best category by semantic intent.
  2. If no category fits, create one:
npx derived-cli@latest create-category "<category-name>"
  1. Re-run list-categories and select the new categoryId.

Selection rules:

  • Prefer exact domain match (e.g., Auth, Payments, Dashboard).
  • Fall back to closest functional match.
  • If still ambiguous, ask the user to choose from top 3 candidates.

3) Parse user request for target block

Extract:

  • Feature/module name
  • Framework/runtime context
  • Scope boundaries (what to include/exclude)

If ambiguous, ask focused clarifications before selecting files.

4) Discover reusable source paths

Include:

  • Core feature implementation files
  • Feature-local types and helpers
  • Feature-specific config and wiring required for reuse

Exclude:

  • Global/shared utilities not specific to the feature
  • Build output, lockfiles, node_modules, .env*

Normalize paths to repository-relative paths rooted at template structure.

Output format:

  • Semicolon-separated paths, e.g.
src/features/auth/service.ts;src/features/auth/types.ts;src/features/auth/routes.ts

5) Compose block metadata

Prepare:

  • blockName: readable, feature-focused
  • categoryId: from list-categories
  • description: 1-2 concise sentences
  • sourcePaths: semicolon-separated
  • setupCommands: comma-separated post-insert commands (or empty)
  • aiInstruction: manual integration steps only (or empty)

6) Create Linear issue (required)

Create a Linear issue with title:

Create Block: <Block Name>

Use this markdown description template:

## Block Details

**Name**: <Block Name>
**Category ID**: <categoryId>
**Project**: <project name/slug from `derived-cli project`>

## Description
<description>

## Source Paths
```
<semicolon-separated-paths>
```

## Setup Commands
```
<comma-separated-commands>
```

## AI Instructions
```
<post-insertion-instructions>
```

## Validation
```bash
npm install && npm run build
```

Recommended issue metadata:

  • Labels: block-creation plus framework label
  • Priority: 2 (High)

## Decision Rules

If project context is missing:
1. Ask user to run `npx derived-cli@latest init <project-slug>`.
2. Re-run `project` and continue.

If category is unclear:
1. Show top matches from `list-categories`.
2. Ask user to select.
3. If needed, create category and retry.

If source scope is too broad:
1. Start with smallest functional slice.
2. Include only files required for independent reuse.

## Final Output Contract

After creating the Linear issue, respond with:

```text
Created Linear issue for block discovery.

And include:

  • Linear issue ID/link
  • Selected categoryId
  • Final semicolon-separated source paths

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

Repository SourceNeeds Review
161.1K94.2Kanthropics
Coding

remotion-best-practices

Use this skills whenever you are dealing with Remotion code to obtain the domain-specific knowledge.

Repository SourceNeeds Review
148.4K2.1Kremotion-dev
Coding

azure-ai

Service Use When MCP Tools CLI

Repository SourceNeeds Review
136.5K155microsoft
Coding

azure-deploy

AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE

Repository SourceNeeds Review
136.1K155microsoft