netresearch/typo3-docs-skill / skills/typo3-docs
typo3-docs
FlaggedUse when TYPO3 extension documentation has to render on docs.typo3.org, which builds a manual from Documentation/guides.xml and reads no Settings.cfg (a single README.rst serves an extension too small for one): when an extension has no documentation yet, or when creating, editing or reviewing Documentation/*.rst, guides.xml, README.md or XLF translations, rendering docs with Docker, TYPO3 RST directives, screenshots, or XLIFF 2-space indentation (TYPO3 v14+).
scripts/extract-php.sh
View on GitHub#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Netresearch DTT GmbH
#
# Extract PHP Code Documentation
#
# Parses PHP files in Classes/ directory to extract:
# - Class names, namespaces, descriptions
# - Method signatures and docblocks
# - Constants with descriptions
# - Security-critical comments
#
set -e
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
# Configuration
PROJECT_DIR="$(pwd)"
DATA_DIR="$(bash "$(dirname "${BASH_SOURCE[0]}")/extraction-dir.sh")/data"
# shellcheck source=SCRIPTDIR/json-string.sh
. "$(dirname "${BASH_SOURCE[0]}")/json-string.sh"
OUTPUT_FILE="${DATA_DIR}/php_apis.json"
CLASSES_DIR="${PROJECT_DIR}/Classes"
# TYPO3 Architecture Documentation Priorities
# Based on references/typo3-extension-architecture.md
get_doc_priority() {
local file_path=$1
if [[ "$file_path" == *"Controller"* ]]; then
echo "HIGH"
elif [[ "$file_path" == *"Domain/Model"* ]]; then
echo "HIGH"
elif [[ "$file_path" == *"Domain/Repository"* ]]; then
echo "MEDIUM-HIGH"
elif [[ "$file_path" == *"Service"* ]]; then
echo "MEDIUM-HIGH"
elif [[ "$file_path" == *"ViewHelper"* ]]; then
echo "MEDIUM"
elif [[ "$file_path" == *"Utility"* ]]; then
echo "MEDIUM"
else
echo "MEDIUM"
fi
}
get_class_category() {
local file_path=$1
if [[ "$file_path" == *"Controller"* ]]; then
echo "controller"
elif [[ "$file_path" == *"Domain/Model"* ]]; then
echo "model"
elif [[ "$file_path" == *"Domain/Repository"* ]]; then
echo "repository"
elif [[ "$file_path" == *"Service"* ]]; then
echo "service"
elif [[ "$file_path" == *"ViewHelper"* ]]; then
echo "viewhelper"
elif [[ "$file_path" == *"Utility"* ]]; then
echo "utility"
else
echo "other"
fi
}
# Create output directory
mkdir -p "${DATA_DIR}"
# Check if Classes/ exists
if [ ! -d "${CLASSES_DIR}" ]; then
echo -e "${YELLOW}No Classes/ directory found, skipping PHP extraction${NC}"
echo '{"classes": []}' > "${OUTPUT_FILE}"
exit 0
fi
echo "Scanning PHP files in: ${CLASSES_DIR}"
# Initialize JSON output
{
echo '{'
printf ' "extraction_date": "%s",\n' "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
echo ' "classes": ['
} > "${OUTPUT_FILE}"
# Find all PHP files
php_files=$(find "${CLASSES_DIR}" -type f -name "*.php" | sort)
file_count=$(echo "$php_files" | wc -l)
current=0
written=0
while IFS= read -r php_file; do
[ -n "$php_file" ] || continue
current=$((current + 1))
rel_path="${php_file#"$PROJECT_DIR"/}"
echo " Processing: ${rel_path} (${current}/${file_count})"
# Extract class information using grep and sed
# This is a simplified extraction - full parsing would require PHP parser
# Get namespace
namespace=$(grep -m 1 '^namespace ' "$php_file" | sed 's/namespace //;s/;//' || echo "")
# Get class name
class_name=$(grep -m 1 '^class \|^final class \|^abstract class ' "$php_file" | \
sed 's/^class //;s/^final class //;s/^abstract class //;s/ extends.*//;s/ implements.*//;s/{//;s/ //g' || echo "")
if [ -z "$class_name" ]; then
continue
fi
# Get class docblock (simplified - just get the first /** */ block)
class_desc=$(awk '/\/\*\*/{flag=1;next}/\*\//{flag=0}flag' "$php_file" | head -20 | grep -v '^ \* @' | sed 's/^ \* //;s/^ \*$//' | tr '\n' ' ' | sed 's/ */ /g;s/^ //;s/ $//')
# Get author
author=$(grep '@author' "$php_file" | head -1 | sed 's/.*@author //;s/ *$//' || echo "")
# Get license
license=$(grep '@license' "$php_file" | head -1 | sed 's/.*@license //;s/ *$//' || echo "")
# Get documentation priority
doc_priority=$(get_doc_priority "$rel_path")
class_category=$(get_class_category "$rel_path")
# Build JSON entry (simplified structure). The separator depends on the
# entries written, not on the files read: a file without a class (an
# interface, a trait) is skipped and must not leave a leading comma.
{
if [ "$written" -gt 0 ]; then
echo ' ,'
fi
echo ' {'
printf ' "name": %s,\n' "$(json_string "$class_name")"
printf ' "namespace": %s,\n' "$(json_string "$namespace")"
printf ' "file": %s,\n' "$(json_string "$rel_path")"
printf ' "description": %s,\n' "$(json_string "$class_desc")"
printf ' "author": %s,\n' "$(json_string "$author")"
printf ' "license": %s,\n' "$(json_string "$license")"
printf ' "documentation_priority": %s,\n' "$(json_string "$doc_priority")"
printf ' "category": %s\n' "$(json_string "$class_category")"
echo -n ' }'
} >> "${OUTPUT_FILE}"
written=$((written + 1))
done <<< "$php_files"
# Close JSON
{
echo
echo ' ]'
echo '}'
} >> "${OUTPUT_FILE}"
echo -e "${GREEN}✓ PHP extraction complete: ${OUTPUT_FILE}${NC}"
echo " Found ${file_count} PHP files"
# NOTE: This is a simplified extractor using bash/grep/sed
# For production use, consider using:
# - nikic/php-parser (PHP)
# - phpdocumentor/reflection-docblock (PHP)
# - Python script with libcst or ast
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |