Token导航 LogoToken导航

Agent Skill · 研究检索

typo3-datahandler(typo3 数据处理程序)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

typo3-datahandler 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 39,733。

总安装 1,371周安装 56GitHub Stars 26下载 439核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:typo3-datahandler(typo3 数据处理程序)
来源仓库:https://github.com/dirnbauer/webconsulting-skills
仓库路径:skills/typo3-datahandler
安装命令:
npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-datahandler
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-datahandler

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

辅助数据清洗、汇总与异常检测,支持 CSV/Excel 格式处理。可用于生成统计口径说明或准备可视化图表数据。需确认数据来源字段含义和时间范围后再进行分析。涉及敏感数据导出时应先确认脱敏规则和权限边界。typo3-datahandler 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/typo3-datahandler

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-d…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

typo3-datahandler 怎么安装?

在终端执行 npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-datahandler。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

typo3-datahandler 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

typo3-datahandler 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-datahandler;npx skills add dirnbauer/webconsulting-skills --skill "typo3-datahandler" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

typo3-datahandler 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

typo3-datahandler 用的人多吗?

公开数据是累计安装 1,371 次,近一周安装 56 次,下载 439 次,GitHub 26 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

typo3-datahandler 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
typo3-datahandler

typo3 数据处理程序 · 本页

1,37126执行命令MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

TYPO3 DataHandler Operations

Compatibility: TYPO3 v14.x All code examples in this skill are designed to work on TYPO3 v14.
TYPO3 API First: Always use TYPO3's built-in APIs, core features, and established conventions before creating custom implementations. Do not reinvent what TYPO3 already provides. Always verify that the APIs and methods you use exist and are not deprecated in TYPO3 v14 by checking the official TYPO3 documentation.

1. The Prime Directive

NEVER use raw SQL (INSERT, UPDATE, DELETE) for pages, tt_content, or any TCA-configured table.

You MUST use the DataHandler to ensure:

  • Reference Index updates (sys_refindex)
  • Cache clearing
  • Version history (sys_history)
  • Workspace compatibility
  • Correct hook/event integration where Core defines it (see §9)
  • FlexForm handling
  • MM relation management

Exceptions (Raw SQL Allowed)

  • Custom logging tables without TCA
  • Bulk analytics/reporting queries (read-only)
  • Migration scripts with explicit reference index rebuild

2. Structure of Arrays

The DataMap ($data)

Used for creating or updating records.

Syntax: $data[tableName][uid][fieldName] = value

Creating a New Record:

Use a unique string starting with NEW as the UID:

<?php
declare(strict_types=1);

$data = [
    'tt_content' => [
        'NEW_1' => [
            'pid' => 1,
            'CType' => 'text',
            'header' => 'My New Content Element',
            'bodytext' => '<p>Content goes here</p>',
            'sys_language_uid' => 0,
        ],
    ],
];

Updating an Existing Record:

Use the numeric UID:

<?php
declare(strict_types=1);

$data = [
    'tt_content' => [
        123 => [
            'header' => 'Updated Header',
            'hidden' => 0,
        ],
    ],
];

Referencing NEW Records:

<?php
declare(strict_types=1);

$data = [
    'pages' => [
        'NEW_page' => [
            'pid' => 1,
            'title' => 'New Page',
        ],
    ],
    'tt_content' => [
        'NEW_content' => [
            'pid' => 'NEW_page', // References the new page
            'CType' => 'text',
            'header' => 'Content on new page',
        ],
    ],
];

The CmdMap ($cmd)

Used for moving, copying, deleting, or undeleting records.

Syntax: $cmd[tableName][uid][command] = value

Delete a Record:

<?php
declare(strict_types=1);

$cmd = [
    'tt_content' => [
        123 => ['delete' => 1],
    ],
];

Move a Record:

<?php
declare(strict_types=1);

$cmd = [
    'tt_content' => [
        123 => ['move' => 456], // Target page UID; use negative UID to place after record
    ],
];

Copy a Record:

<?php
declare(strict_types=1);

$cmd = [
    'tt_content' => [
        123 => ['copy' => 1], // Target page UID
    ],
];

Localize a Record:

<?php
declare(strict_types=1);

$cmd = [
    'tt_content' => [
        123 => [
            'localize' => 1, // Target language UID
        ],
    ],
];

3. Execution Pattern

TYPO3's public DataHandler API for TYPO3 v14 is simply:

  1. Obtain a DataHandler via GeneralUtility::makeInstance(DataHandler::class) or constructor DI — avoid new DataHandler() so Core wiring (hooks, collaborators) stays consistent.
  2. Call start($dataMap, $commandMap[, $backendUser[, $referenceIndexUpdater]]) before any process_* call. The 4th parameter exists but is @internal; extension code should normally use only the first 2-3 arguments.
  3. Call process_datamap() and / or process_cmdmap()
  4. Inspect $dataHandler->errorLog, verify expected keys in $dataHandler->substNEWwithIDs for new records, and (in workspaces) review $dataHandler->autoVersionIdMap when you expect version rows.

Cache: Prefer CacheManager / cache groups or PSR-14 cache events instead of legacy DataHandler cache helpers.

The official docs do not define a general transaction contract for DataHandler. In normal extension code, use the plain API first and only add your own transaction handling after carefully validating the database connections and side effects involved in your specific use case.

<?php
declare(strict_types=1);

namespace Vendor\Extension\Service;

use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;

final class ContentService
{
    public function createOrUpdateContent(array $data, array $cmd = []): array
    {
        /** @var DataHandler $dataHandler */
        $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
        $dataHandler->start($data, $cmd);

        if ($data !== []) {
            $dataHandler->process_datamap();
        }

        if ($cmd !== []) {
            $dataHandler->process_cmdmap();
        }

        if ($dataHandler->errorLog !== []) {
            throw new \RuntimeException(
                'DataHandler error: ' . implode(', ', $dataHandler->errorLog),
                1700000001
            );
        }

        return $dataHandler->substNEWwithIDs;
    }
}

4. Backend Context

DataHandler requires a valid backend user context. It does not require you to manually fake admin mode by mutating $GLOBALS['BE_USER']->user.

  • In CLI / scheduler contexts, initialize backend authentication before using DataHandler
  • TYPO3 commands use the _cli_ backend user
  • If you need another backend user, pass a proper BackendUserAuthentication object as the third argument to start()
  • Use permission checks and a real backend user object instead of manually setting $GLOBALS['BE_USER']->user['admin'] = 1

CLI Command Setup (TYPO3 v14)

<?php
declare(strict_types=1);

namespace Vendor\Extension\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Core\Bootstrap;

#[AsCommand(
    name: 'myext:import',
    description: 'Import data using DataHandler',
)]
final class ImportCommand extends Command
{
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        Bootstrap::initializeBackendAuthentication();

        // Your DataHandler logic here...

        return Command::SUCCESS;
    }
}

Using an Alternative Backend User

<?php
declare(strict_types=1);

use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;

final class ImportService
{
    public function runAsUser(
        array $data,
        array $cmd,
        BackendUserAuthentication $backendUser
    ): void {
        /** @var DataHandler $dataHandler */
        $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
        $dataHandler->start($data, $cmd, $backendUser);
        $dataHandler->process_datamap();
        $dataHandler->process_cmdmap();

        if ($dataHandler->errorLog !== []) {
            throw new \RuntimeException(
                'DataHandler error: ' . implode(', ', $dataHandler->errorLog),
                1700000001
            );
        }
    }
}

5. Reference Index Handling

For normal DataHandler writes, TYPO3 keeps the Reference Index in sync automatically. You usually do not need to call ReferenceIndex manually after ordinary process_datamap() / process_cmdmap() usage.

Manual Reference Index updates are primarily relevant for:

  • Deployments and TYPO3 upgrades
  • Changes to TCA-defined relations
  • Migrations or scripts that bypass DataHandler
  • Repair / maintenance scenarios

Rebuild the full Reference Index

vendor/bin/typo3 referenceindex:update

Update a specific record manually (rare)

<?php
declare(strict_types=1);

use TYPO3\CMS\Core\Database\ReferenceIndex;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
$referenceIndex->updateRefIndexTable('tt_content', 123);

6. Common Pitfalls

Pitfall 1: Missing PID for New Records

// ❌ WRONG - Missing pid
$data = ['tt_content' => ['NEW_1' => ['header' => 'Test']]];

// ✅ CORRECT - Always include pid
$data = ['tt_content' => ['NEW_1' => ['pid' => 1, 'header' => 'Test']]];

Pitfall 2: Assuming String vs Integer UIDs Matter (Usually They Do Not)

DataHandler uses MathUtility::canBeInterpretedAsInteger() for many UID checks. A numeric string such as '123' is treated like 123 for typical existing-record keys.

// Both are valid for UID 123 in common cases
$data = ['tt_content' => [123 => ['header' => 'Int key']]];
$data = ['tt_content' => ['123' => ['header' => 'String key']]];

// ✅ Prefer integer keys for clarity and static analysis
$data = ['tt_content' => [123 => ['header' => 'Recommended style']]];

Still wrong: using non-numeric strings as placeholders without the NEW prefix (e.g. arbitrary slugs instead of NEW_1). New records must use NEW… placeholders as shown in §2. Edge case: strings that are not valid integer strings per MathUtility::canBeInterpretedAsInteger() (e.g. some leading-zero forms) — use integers or plain digit strings.

Pitfall 3: Forgetting process_datamap() / process_cmdmap()

// ❌ WRONG - Nothing happens
$dataHandler->start($data, $cmd);

// ✅ CORRECT - Actually process the data
$dataHandler->start($data, $cmd);
$dataHandler->process_datamap();
$dataHandler->process_cmdmap();

Pitfall 4: Ignoring Error Log

// ❌ WRONG - Silently ignoring errors
$dataHandler->process_datamap();

// ✅ CORRECT - Check for errors
$dataHandler->process_datamap();
if (!empty($dataHandler->errorLog)) {
    // Handle errors appropriately
    throw new \RuntimeException(implode(', ', $dataHandler->errorLog));
}

7. Retrieving New Record UIDs

After processing, get the real UIDs for NEW records:

<?php
declare(strict_types=1);

$dataHandler->process_datamap();

// Get the real UID for 'NEW_1'
$newContentUid = $dataHandler->substNEWwithIDs['NEW_1'] ?? null;

if ($newContentUid === null) {
    throw new \RuntimeException('Failed to create content element');
}

8. Workspace-Aware Operations

When working with workspaces:

<?php
declare(strict_types=1);

// Check if we're in a workspace
$workspaceId = $GLOBALS['BE_USER']->workspace;

if ($workspaceId > 0) {
    // In workspace - DataHandler will create versioned records
    // Use the wsol (workspace overlay) for reading
}

// Force live workspace for specific operations
$previousWorkspace = $GLOBALS['BE_USER']->workspace;
$GLOBALS['BE_USER']->setWorkspace(0);

// ... perform operations ...

$GLOBALS['BE_USER']->setWorkspace($previousWorkspace);

9. Extending DataHandler: Hooks and Real Core Events

Facts for TYPO3 v14: TYPO3 Core does not ship PSR-14 events named like BeforeRecordOperationEvent, AfterDatabaseOperationsEvent, or ModifyRecordBeforeInsertEvent. Those names are not part of Core. For datamap/cmdmap extension points beyond documented PSR-14 events, use SC_OPTIONS hook classes (below). Those hooks expose callbacks throughout the lifecycle (*_beforeStart, *_preProcess, *_postProcess, *_afterDatabaseOperations, *_afterAllOperations / *_afterFinish, etc.) — not a single “after everything” moment. Always confirm APIs in TYPO3 Explained — Events (DataHandling) and \TYPO3\CMS\Core\DataHandling\Event.

9.1 SC_OPTIONS hook classes (primary pattern for datamap/cmdmap)

Register classes on t3lib/class.t3lib_tcemain.php — e.g. processDatamapClass / processCmdmapClass. Core still invokes these on TYPO3 v14. Each registration receives multiple hook methods over the datamap/cmdmap lifecycle (before start, pre/post process, after DB, after all) — see your hook class naming pattern in Core’s DataHandler.

ext_localconf.php:

<?php
declare(strict_types=1);

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][]
    = \Vendor\Extension\Hooks\DataHandlerHook::class;

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][]
    = \Vendor\Extension\Hooks\DataHandlerHook::class;

Hook class (example: processDatamap_afterDatabaseOperations — one of several methods Core may call on the same class):

<?php
declare(strict_types=1);

namespace Vendor\Extension\Hooks;

use TYPO3\CMS\Core\DataHandling\DataHandler;

final class DataHandlerHook
{
    public function processDatamap_afterDatabaseOperations(
        string $status,
        string $table,
        string|int $id,
        array $fieldArray,
        DataHandler $dataHandler
    ): void {
        if ($table !== 'tt_content') {
            return;
        }

        if ($status === 'new') {
            $newUid = $dataHandler->substNEWwithIDs[$id] ?? $id;
            // …
        }

        if ($status === 'update') {
            // …
        }
    }
}

Other keys on the same SC_OPTIONS path include moveRecordClass, processTranslateToClass, checkModifyAccessList, clearPageCacheEval, clearCachePostProc, etc. — inspect DataHandler in Core for the full set.

9.2 Real PSR-14 events in TYPO3\CMS\Core\DataHandling\Event

Core currently documents only these events under that namespace (reference index / link parsing — not generic “before every save”):

EventPurpose
IsTableExcludedFromReferenceIndexEventExclude a table from the Reference Index
AppendLinkHandlerElementsEventExtend SoftRef link-handler UI elements

Example listener (Reference Index exclusion):

<?php
declare(strict_types=1);

namespace Vendor\Extension\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\DataHandling\Event\IsTableExcludedFromReferenceIndexEvent;

#[AsEventListener(identifier: 'vendor-extension/skip-my-cache-table-from-refindex')]
final class ExcludeTableFromReferenceIndexListener
{
    public function __invoke(IsTableExcludedFromReferenceIndexEvent $event): void
    {
        if ($event->getTable() === 'tx_myext_cache') {
            $event->markAsExcluded();
        }
    }
}

10. Version Constraints for Extensions

When creating extensions that use DataHandler, ensure proper version constraints:

<?php
// ext_emconf.php
$EM_CONF[$_EXTKEY] = [
    'title' => 'My Extension',
    'version' => '1.0.0',
    'state' => 'stable',
    'constraints' => [
        'depends' => [
            'typo3' => '14.0.0-14.99.99',
            'php' => '8.2.0-8.4.99',
        ],
    ],
];

v14-Only Changes

The following DataHandler changes apply exclusively to TYPO3 v14.

Removed Properties [v14 only]

  • DataHandler->userid and DataHandler->admin properties removed (#107848). The DataHandler now uses the backend user from $GLOBALS['BE_USER'] directly. Do not set these properties.
  • DataHandler->storeLogMessages removed (#106118). Logging behavior is no longer configurable via this property.
  • DataHandler->copyWhichTables, DataHandler->neverHideAtCopy, DataHandler->copyTree removed (#107856). These internal properties are no longer accessible.

New discard cmdmap command [v14 only]

Feature #107519 adds a first-class discard command on the cmdmap so you can drop workspace versions without the old version + clearWSID / flush workaround. Internal discard-related logic existed in Core before v14; what is new is this explicit public cmdmap API. Use the versioned record UID (t3ver_wsid > 0), not the live record.

The legacy version actions remain supported but are considered deprecated in the changelog sense in favor of discard. TYPO3 v14 does not emit a dedicated runtime deprecation notice for them.

$cmd = [
    'tt_content' => [
        $versionedUid => ['discard' => true],
    ],
];

ISO8601 Date Handling [v14 only]

DataHandler now accepts both qualified (2026-03-09T12:00:00+01:00) and unqualified (2026-03-09T12:00:00) ISO8601 date strings for datetime fields (#105549).

Record API in List/Page Modules [v14 only]

The List Module and Page Module now use the Record API (#107356, #92434) instead of raw array data for rendering. Custom preview renderers and record transformations must adapt to Record objects.

Reference Index Check Moved [v14 only]

The Reference Index check has been moved to the Install Tool (#107629). The previous backend module approach is no longer available.


Credits & Attribution

Source: https://github.com/dirnbauer/webconsulting-skills

平台分布

Claude Code

28.89%
按下载量换算127

OpenCode

24.8%
按下载量换算109

Gemini CLI

19.2%
按下载量换算84

windsurf

12.66%
按下载量换算56

Cursor

8.01%
按下载量换算35

Codex

3.37%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dirnbauer/webconsulting-skills --skill typo3-datahandler;npx skills add dirnbauer/webconsulting-skills --skill "typo3-datahandler" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills