← GDG /

#259 gdtest_skill_curated

#259 gdtest_skill_curated OK INIT
Tests curated skill from skills/<name>/SKILL.md directory
A hand-crafted SKILL.md in skills/gdtest-skill-curated/. Great Docs should detect and use the curated file instead of auto-generating. Tests curated-skill priority, table rendering, gotchas section, and the full Markdown-to-HTML rendering pipeline on the Skills page.
View Site → Build Log ๐Ÿงช Test Coverage

Build Mode

○ No great-docs.yml

This package has no pre-supplied config. It tests the full great-docs initgreat-docs build pipeline from scratch, relying entirely on auto-detection of the package layout, docstring style, and exports.

Dimensions

S2
S2Curated skillskill

Source Files

๐Ÿ“ gdtest_skill_curated/
๐Ÿ“„ __init__.py
"""A package with a curated Agent Skill."""

__version__ = "0.1.0"
__all__ = ["fetch", "parse", "CacheStore"]


class CacheStore:
    """
    A simple in-memory cache.

    Parameters
    ----------
    max_size
        Maximum number of entries.
    ttl
        Time-to-live in seconds.
    """

    def __init__(self, max_size: int = 100, ttl: int = 3600):
        self.max_size = max_size
        self.ttl = ttl
        self._store: dict = {}

    def get(self, key: str) -> object | None:
        """
        Retrieve a cached value.

        Parameters
        ----------
        key
            The cache key.

        Returns
        -------
        object or None
            The cached value, or None if not found.
        """
        return self._store.get(key)

    def set(self, key: str, value: object) -> None:
        """
        Store a value in the cache.

        Parameters
        ----------
        key
            The cache key.
        value
            The value to cache.
        """
        self._store[key] = value


def fetch(url: str, timeout: int = 30) -> str:
    """
    Fetch content from a URL.

    Parameters
    ----------
    url
        The URL to fetch.
    timeout
        Request timeout in seconds.

    Returns
    -------
    str
        The response body.
    """
    return f"<content from {url}>"


def parse(html: str, selector: str = "body") -> list[str]:
    """
    Parse HTML and extract text matching a CSS selector.

    Parameters
    ----------
    html
        Raw HTML string.
    selector
        CSS selector to match.

    Returns
    -------
    list of str
        Extracted text fragments.
    """
    return [html[:50]]
๐Ÿ“ skills/
๐Ÿ“ gdtest-skill-curated/
๐Ÿ“„ SKILL.md
---
name: gdtest-skill-curated
description: >
  Fetch, parse, and cache web content with gdtest-skill-curated.
  Use when writing Python code that fetches URLs, parses HTML,
  or needs in-memory caching.
license: MIT
compatibility: Requires Python >=3.10.
metadata:
  author: gdg-test-suite
  version: "1.0"
---

# gdtest-skill-curated

A lightweight toolkit for fetching, parsing, and caching web content.

## Installation

```bash
pip install gdtest-skill-curated
```

## When to use what

| Need | Use |
|------|-----|
| Fetch a URL | `fetch(url)` |
| Parse HTML content | `parse(html, selector)` |
| Cache results in memory | `CacheStore()` |
| Set cache TTL | `CacheStore(ttl=seconds)` |
| Limit cache size | `CacheStore(max_size=n)` |

## Gotchas

1. **Always set a timeout** when calling `fetch()` โ€” the default is
   30 seconds, which may be too long for interactive use.
2. **`parse()` returns a list**, not a string. Even for a single
   match you get a one-element list.
3. **`CacheStore` is not thread-safe.** Use a lock if sharing across
   threads.
4. The module name is `gdtest_skill_curated`, not
   `gdtest-skill-curated`.

## Capabilities and boundaries

**What agents can configure:**

- Fetch URLs with custom timeouts
- Parse HTML with CSS selectors
- Create and query in-memory caches
- Set TTL and max size on caches

**Requires human setup:**

- Network access for `fetch()`
- Installing the package (`pip install`)

## Resources

- [llms.txt](llms.txt) โ€” Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) โ€” Full documentation for LLMs
๐Ÿ“„ README.md
# gdtest-skill-curated

A package with a hand-crafted Agent Skill for testing Great Docs
curated skill detection.

## Installation

```bash
pip install gdtest-skill-curated
```
๐Ÿ“„ great-docs.yml generated
# Great Docs Configuration
# See https://posit-dev.github.io/great-docs/user-guide/configuration.html

# Module Name (optional)
# ----------------------
# Set this if your importable module name differs from the project name.
# Example: project 'py-yaml12' with module name 'yaml12'
# module: yaml12

# Docstring Parser
# ----------------
# The docstring format used in your package (numpy, google, or sphinx)
parser: numpy

# Dynamic Introspection
# ---------------------
# Use runtime introspection for more accurate documentation (default: true)
# Set to false if your package has cyclic alias issues (e.g., PyO3/Rust bindings)
dynamic: true

# API Discovery Settings
# ----------------------
# Exclude items from auto-documentation
# exclude:
#   - InternalClass
#   - helper_function

# Logo & Favicon
# ---------------
# Point to a single logo file (replaces the text title in the navbar):
# logo: assets/logo.svg
#
# For light/dark variants:
# logo:
#   light: assets/logo-light.svg
#   dark: assets/logo-dark.svg
#
# To show the text title alongside the logo, add: show_title: true

# Funding / Copyright Holder
# --------------------------
# Credit the organization that funds or holds copyright for this package.
# Displays in sidebar and footer. Homepage and ROR provide links.
# funding:
#   name: "Posit Software, PBC"
#   roles:
#     - Copyright holder
#     - funder
#   homepage: https://posit.co
#   ror: https://ror.org/03wc8by49

# API Reference Structure
# -----------------------
# Customize the sections below to organize your API documentation.
# - Reorder items within a section to change their display order
# - Move items between sections or create new sections
# - Use 'members: false' to exclude methods from documentation
# - Add 'desc:' to sections for descriptions

reference:
  - title: Classes
    desc: Main classes provided by the package
    contents:
      - CacheStore  # 2 method(s)

  - title: Functions
    desc: Utility functions
    contents:
      - fetch
      - parse

# Site URL
# --------
# Canonical address of the deployed documentation site.
# Required for subdirectory deployments, skills page install commands,
# .well-known/ discovery, and sitemaps.
# site_url: "https://your-org.github.io/your-package/"

# Site Settings
# -------------
# site:
#   theme: flatly              # Quarto theme (default: flatly)
#   toc: true                  # Show table of contents (default: true)
#   toc-depth: 2               # TOC heading depth (default: 2)
#   toc-title: On this page    # TOC title (default: "On this page")

# Jupyter Kernel
# --------------
# Jupyter kernel to use for executing code cells in .qmd files.
# This is set at the project level so it applies to all pages, including
# auto-generated API reference pages. Can be overridden in individual .qmd
# file frontmatter if needed for special cases.
jupyter: python3

# CLI Documentation
# -----------------
# cli:
#   enabled: true              # Enable CLI documentation
#   module: my_package.cli     # Module containing Click commands
#   name: cli                  # Name of the Click command object