📝
AutomationPython

Add Line by Type

by CoderWanFeng

Add Line by Type is an Automation skill for Claude Code, published by CoderWanFeng in python-office.

1.3K stars299 forkson CoderWanFeng/python-officeAdded 2026/07/20Repository updated 2026/08/04
officepippypipythonweixin
Install in seconds
Install Add Line by Type
Copy Add Line by Type into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/CoderWanFeng/python-office/tree/develop/skills/file/add_line_by_type ~/.claude/skills/add_line_by_type

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/CoderWanFeng/python-office.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/file/add_line_by_type/SKILL.md in CoderWanFeng/python-office
Installs to
~/.claude/skills/add_line_by_type
Collection
One of 50 skills cataloged from this repository
Category
Automation2226 skills

What Add Line by Type does

Add configured code lines to a selected file with python-office, with an explicit warning that this historical function remains untested.

Add Line by Type is cataloged under Automation on DirSkills. Add Line by Type comes from a repository tagged office, pip, pypi, python and weixin.

Reviewed 2026-08-04

DirSkills review

This python-office wrapper maps a dictionary of code lines to a selected file type and output path. Its own source marks the historical function TODO and its behavior untested, so it needs a disposable-file trial before real use.

  • The documented call accepts add_line_dict and file_path, with file_type defaulting to .py and output_path defaulting to add_line; it returns no value.
  • Work on a copy, inspect where every line was inserted, and confirm the generated output before applying the helper to a working tree.

Documentation

README

add_line_by_type Skill

根据类型添加行

功能描述

根据文件类型,向指定文件中添加对应的代码行。

⚠️ TODO: 该功能为历史功能,行为待测试。

所属分类

office/skills/file/add_line_by_type/

调用方式

from skills.file import add_line_by_type

add_line_by_type(
    add_line_dict={'import': 'import os'},
    file_path='./test.py',
    file_type='.py',
    output_path='add_line'
)

参数说明

参数 类型 必填 默认值 说明
add_line_dict dict - 添加行的字典
file_path str - 文件路径
file_type str '.py' 文件类型
output_path str 'add_line' 输出路径

返回值

None

原始函数

office.api.file.add_line_by_type

Frequently asked about Add Line by Type

  • What else does CoderWanFeng publish alongside Add Line by Type?

    Add Line by Type is one of 50 skills that DirSkills catalogs from CoderWanFeng/python-office, the repository it ships in. Its siblings there include Add Image Watermark, Add Text Watermark and Add Watermark. Each one is a separate skill with its own page in this directory, installs the same way Add Line by Type does, and is maintained by CoderWanFeng in that same repository. The rest of the collection is listed on the CoderWanFeng/python-office page.

  • How does Add Line by Type compare to other Automation skills?

    Add Line by Type ranks #641 by stars among the 2226 Automation skills in this catalog. The most-starred ones next to it are Autonomous Loops, Autonomous Agent Harness and Automation Audit Ops. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Add Line by Type against them. Open each page to compare what they document and how they install.