You can use Clientlibs to extend the default implementation and add new functionality while reusing the default functions, objects, and methods. When customizing, you can create your own clientlib under / apps.
The custom clientlib for AEM authoring must follow these rules:
1. depend on the authoring clientlib cq.authoring.editor.sites.page
2. be part of the appropriate cq.authoring.editor.sites.page.hook category
An example of a custom client library created for AEM authoring would live in this path (below), and must have the .context.xml configured like so.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"