writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
hooks-and-extensionsExtend Kedro with hooks plugins custom CLI commands custom datasets custom runners notebooks serving and deployment integration points.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task asks how to extend Kedro rather than only use a standard project: project hooks, installable plugins, custom Click commands, custom datasets, custom runner surfaces, IPython/Jupyter line magics, minimal HTTP serving, or deployment-platform integration patterns.
from kedro.framework.hooks import hook_impl, register instances in settings.py as HOOKS = (...), or disable installed plugin hooks with DISABLE_HOOKS_FOR_PLUGINS.kedro.hooks, kedro.cli_hooks, kedro.global_commands, kedro.project_commands, kedro.init, kedro.line_magic, or starter entry points.src/<package_name>/cli.py, or expose reusable Click command groups from a plugin.AbstractDataset or AbstractVersionedDataset subclass, especially when the task is about the extension contract rather than basic catalog.yml syntax.%reload_kedro, %load_node, or kedro.line_magic plugin entry points.KedroSession, kedro new, kedro package, or stock kedro ipython/kedro jupyter: read ../project-cli-and-sessions/SKILL.md.kedro run flags, slicing, resume, ParallelRunner multiprocessing details, or async I/O behavior: read ../runners-and-execution/SKILL.md.OmegaConfigLoader, and catalog validation basics: read ../data-catalog-and-config/SKILL.md.node(), Pipeline, namespacing, tags, and registry design: read ../pipelines-and-nodes/SKILL.md.../inspection-and-server/SKILL.md.../../SKILL.md.1.4.0; import and distribution name are kedro; Python requirement is >=3.10.hook_impl from kedro.framework.hooks; CLI hook implementations import cli_hook_impl from kedro.framework.cli.hooks.settings.py under HOOKS; installed plugin hooks are discovered from the kedro.hooks entry point group.DISABLE_HOOKS_FOR_PLUGINS = ("<plugin-distribution-name>",) prevents auto-registered hooks for selected plugin distributions.ParallelRunner in Kedro 1.4.0 warns that node and dataset hooks are not executed in worker processes; choose SequentialRunner or ThreadRunner when those hooks are essential.kedro.global_commands, kedro.project_commands, kedro.init, kedro.line_magic, kedro.hooks, and kedro.cli_hooks.cli.py; later sources can override earlier commands.references/hooks-and-plugins.md for hook specs, hook signatures, registration, plugin entry point groups, CLI hooks, command precedence, and plugin debugging.references/custom-datasets-and-cli.md for AbstractDataset contracts, versioned datasets, project cli.py overrides, reusable plugin commands, custom runner extension surfaces, and validation checks.references/deployment-and-integrations.md for notebooks/IPython, line magics, HTTP serving extension, deployment-platform patterns, and optional dependency/security notes.references/troubleshooting.md when hooks are not firing, plugin entry points do not load, custom commands conflict, datasets fail to instantiate, optional extras are missing, or serving/deployment integration fails.src/<package_name>/hooks.py, decorate methods with @hook_impl, omit unused parameters, do not use defaults, then register instances in src/<package_name>/settings.py as HOOKS = (ProjectHooks(),).@hook_impl(tryfirst=True) or @hook_impl(trylast=True) only when order is essential.[project.entry-points."kedro.hooks"]; for CLI lifecycle hooks, expose an instance through [project.entry-points."kedro.cli_hooks"].src/<package_name>/cli.py for project-specific overrides and plugin kedro.global_commands or kedro.project_commands for reusable commands.kedro.io.AbstractDataset or AbstractVersionedDataset, implement load, save, and _describe, and configure by fully qualified class path in catalog.yml.KedroServiceSession; warn before network, cloud, credential, or public-server operations.KEDRO_DISABLE_TELEMETRY=1 or DO_NOT_TRACK=1 for CLI probes or automated examples when telemetry must be disabled.kedro server start --reload is development-only; the built-in server does not include authentication, authorization, request queuing, or per-request session isolation.